V4: remove unnecessary spills and order them correctly.
authorErik Verbruggen <erik.verbruggen@digia.com>
Wed, 15 Jan 2014 13:36:37 +0000 (14:36 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Thu, 16 Jan 2014 08:57:42 +0000 (09:57 +0100)
commit1ac728b7601dd5fee2fee7ea714f0626055384df
tree5de8b3afb61dac104f1070942978ba9745ea9dc6
parenta1b64d9566a49d287a8fad122859e8a99ad92151
V4: remove unnecessary spills and order them correctly.

When doing edge resolving, too many spills were generated, and the
dependency tracking of moves was not complete. Now we only insert spills
that are caused by phi-nodes (because any other spill would be generated
at the point a variable was defined). However, there can still be
multiple dependencies between the moves generated by the edge resolving.
Instead of only checking the first dependency, all of them are tracked.

The bug report was a case where an unneccesary spill was generated, that
got tracked, but "suppressed" the other (valid!) dependent move. The
randomness was caused by the hash seeding of QHash.

Task-number: QTBUG-35840

Change-Id: Ifbc3c8fc13de53c46a8b5859721b2497189921a3
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
src/qml/compiler/qv4regalloc.cpp
src/qml/compiler/qv4ssa.cpp
src/qml/compiler/qv4ssa_p.h