Comment #3 on issue 2250 by [email protected]: LICM is too aggressive
with moving checks across conditional control flow
http://code.google.com/p/v8/issues/detail?id=2250
The test case stanford-crypto-pbkdf2 in the Kraken test suites has the same
problem. The sjcl.misc.pbkdf2 will be de-optimized repeatedly. Although
this issue is reported then I will explain my proposal for this problem.
In the current implementation. the check of GVN in the function
HGlobalValueNumberer::AllowCodeMotion() is too aggressive. According to
this function, if one function is de-optimized for 8 times, all the GVN in
all the loops of this function will be disabled.
My suggestion for these two problem is, the SharedFunctionInfo has a array
to record
which AST node triggers the deoptimization and count the times. During the
optimized compilation, if one loop triggers the deoptimization for more
than a threshold value, for example, 3 times, the GVN in this loop will be
disabled. the GVN for other loops will NOT be affected.
the attached is the patch for this problem. With this code, I get more than
5% improvement for stanford-crypto-pbkdf2 test case.
Attachments:
patch.txt 8.0 KB
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev