diff options
author | Erik Verbruggen <[email protected]> | 2014-05-22 16:09:43 +0200 |
---|---|---|
committer | Erik Verbruggen <[email protected]> | 2014-06-19 11:41:42 +0200 |
commit | 7e1ad9e2bd625784579cbd74ee30aff18d7359d5 (patch) | |
tree | ef4e38b68a3532f3ae9ff65038ac358da32817c7 | |
parent | 2b179c74b7a46288e22f13ceb292514f8a9805ce (diff) |
V4 JIT: add hint for phi-node operands.
Not only is it preferable for the target of a phi-node to be stored in
the same location as one of the sources, but the same yields for the
sources. For example, in a loop, it is preferable to store the result
of a value used in a phi-node in the loop header to be stored in the
same location as that phi-node's target. Doing that will eliminate extra
moves that are generated to resolve differences between edges.
Change-Id: I0cb5fbe8915d602ac9b9a2a7e8b95cf47b1efb68
Reviewed-by: Lars Knoll <[email protected]>
-rw-r--r-- | src/qml/jit/qv4regalloc.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/qml/jit/qv4regalloc.cpp b/src/qml/jit/qv4regalloc.cpp index 6a2f5ca640..2a3a1cd1bc 100644 --- a/src/qml/jit/qv4regalloc.cpp +++ b/src/qml/jit/qv4regalloc.cpp @@ -640,6 +640,7 @@ protected: // IRDecoder if (Temp *t = e->asTemp()) { addUses(t, Use::CouldHaveRegister); addHint(s->targetTemp, t); + addHint(t, s->targetTemp); } } } |