20 Apr
2010
20 Apr
'10
9:17 a.m.
On Apr 20, 2010, at 2:11 AM, Kent Hansen wrote:
Hi, I don't see constant propagation mentioned at http://trac.webkit.org/wiki/SquirrelFishPerfIdeas . Has it been considered? (On a related note, is the above page up-to-date?)
With JSC as of r57470:
var a = 3; a + 7;
produces the bytecode
... [ 7] mov r-15, 3(@k1) [ 10] add r0, r-15, 7(@k2) ...
Worth pursuing? Reasonably feasible to implement in the compiler?
To do this well at the bytecode level, you need a control flow graph for each function and some way to do dataflow (perhaps by creating an SSA form of the bytecode). Regards, Maciej