[webkit-dev] Loop invariant code motion support

Filip Pizlo fpizlo at apple.com
Mon Feb 27 09:42:17 PST 2012


On Feb 27, 2012, at 6:55 AM, vahag vardanyan <vahagvardanyan at gmail.com> wrote:

> Hi.
> In this article http://wingolog.org/archives/2011/10/28/javascriptcore-the-webkit-js-implementation is saying that DFG jit doesn't support loop invariant code motion.
> But the article is written on 28 October, so does DFG currently support loop invariant code motion or is anyone working on it??

Loop invariant code motion (LICM) is one of two ways of removing expensive operations from loops. The other is loop peeling with global common subexpression elimination. We haven't really decided which one we want; I think we'll have to investigate a broader range of JS programs to decide. 

Yuqiang's excellent LICM implementation (see https://bugs.webkit.org/show_bug.cgi?id=76770) achieves a significant speed-up on one benchmark (Kraken/ai-astar). Unfortunately this formulation does not currently significantly progress other benchmark suites, and imposes significant infrastructural limitations. This will probably no longer be the case once we tweak the DFG to better support code motion - something that it does not do well right now. 

It's a tough trade off though, but one we decided to make because we're in the middle of adding a variety of other features to the compiler (like activations, nested functions, better debugability, and better register allocation). 

-Filip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20120227/4a678fa2/attachment.html>


More information about the webkit-dev mailing list