diff options
author | Erik Verbruggen <erik.verbruggen@qt.io> | 2016-11-22 14:02:49 +0100 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@qt.io> | 2016-12-01 14:49:14 +0000 |
commit | f9044963096c2876dbf2e33f85d9e8946db5df90 (patch) | |
tree | 33a6f8741afb61a6770a7faa44c194cf8ab28872 | |
parent | d3797d72a21269a7301b195b16c5c5936c586a44 (diff) |
V4: Do not generate runtime calls when comparing ints/doubles
There is no need to restrict genertion of double comparisson
instructions or integer comparisson instructions to constants or values
that reside in registers. We're prefectly able to load a value into a
scratch register in order to generate those instructions.
Change-Id: I25e832293817eed6450cb08c98dd95640326a518
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
-rw-r--r-- | src/qml/jit/qv4isel_masm.cpp | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/qml/jit/qv4isel_masm.cpp b/src/qml/jit/qv4isel_masm.cpp index ed1455b086..c2ca804ffa 100644 --- a/src/qml/jit/qv4isel_masm.cpp +++ b/src/qml/jit/qv4isel_masm.cpp @@ -69,13 +69,6 @@ using namespace QV4::JIT; namespace { -inline bool isPregOrConst(IR::Expr *e) -{ - if (IR::Temp *t = e->asTemp()) - return t->kind == IR::Temp::PhysicalRegister; - return e->asConst() != 0; -} - class QIODevicePrintStream: public FilePrintStream { Q_DISABLE_COPY(QIODevicePrintStream) @@ -1720,9 +1713,6 @@ QT_END_NAMESPACE bool InstructionSelection::visitCJumpDouble(IR::AluOp op, IR::Expr *left, IR::Expr *right, IR::BasicBlock *iftrue, IR::BasicBlock *iffalse) { - if (!isPregOrConst(left) || !isPregOrConst(right)) - return false; - if (_as->nextBlock() == iftrue) { Assembler::Jump target = _as->branchDouble(true, op, left, right); _as->addPatch(iffalse, target); @@ -1737,9 +1727,6 @@ bool InstructionSelection::visitCJumpDouble(IR::AluOp op, IR::Expr *left, IR::Ex bool InstructionSelection::visitCJumpSInt32(IR::AluOp op, IR::Expr *left, IR::Expr *right, IR::BasicBlock *iftrue, IR::BasicBlock *iffalse) { - if (!isPregOrConst(left) || !isPregOrConst(right)) - return false; - if (_as->nextBlock() == iftrue) { Assembler::Jump target = _as->branchInt32(true, op, left, right); _as->addPatch(iffalse, target); |