V4 IR: Add loop peeling.
authorErik Verbruggen <erik.verbruggen@digia.com>
Wed, 23 Jul 2014 10:22:11 +0000 (12:22 +0200)
committerErik Verbruggen <erik.verbruggen@digia.com>
Mon, 18 Aug 2014 14:05:55 +0000 (16:05 +0200)
commit2ae518d3a4ea994dfb6c120f826ef7c801b70807
tree60b14fe12a75619cfef8494789dd72ddb610ff8b
parent7e5a589b905969a5712b801cec01be257fbc237c
V4 IR: Add loop peeling.

By peeling the first iteration off of a loop and putting it in front of
the loop, type inference can deduce more type information for esp. loop
induction variables. To prevent increasing the code size too much, only
the inner-most loops are peeled.

This gives a 10% speed-up on crypto.js.

Change-Id: I57f9611695bc8defc0bff84e440b8a20b2c8a34e
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
src/qml/compiler/qv4jsir.cpp
src/qml/compiler/qv4jsir_p.h
src/qml/compiler/qv4ssa.cpp