RESOLVED FIXED Bug 123638
FTL should use a simple optimization pipeline by default
https://bugs.webkit.org/show_bug.cgi?id=123638
Summary FTL should use a simple optimization pipeline by default
Filip Pizlo
Reported 2013-11-01 14:58:59 PDT
My experiments show a 20% speed-up on imagine-gaussian-blur
Attachments
the patch (5.12 KB, patch)
2013-11-01 14:59 PDT, Filip Pizlo
ggaren: review+
Filip Pizlo
Comment 1 2013-11-01 14:59:56 PDT
Created attachment 215764 [details] the patch
Nadav Rotem
Comment 2 2013-11-01 15:12:02 PDT
270 llvm->AddInstructionCombiningPass(modulePasses); 271 llvm->AddPromoteMemoryToRegisterPass(modulePasses); I imagine that you are running instcombine and constantprop before mem2reg because the code you generate does not have too many allocas. Have you considered running earlyCSE instead of GVN ? Have you considered adding LICM or JumpThreading ?
Geoffrey Garen
Comment 3 2013-11-01 15:13:36 PDT
Comment on attachment 215764 [details] the patch View in context: https://bugs.webkit.org/attachment.cgi?id=215764&action=review r=me > Source/JavaScriptCore/ftl/FTLCompile.cpp:271 > + llvm->AddPromoteMemoryToRegisterPass(modulePasses); Shouldn't mem2reg always go first? (My understanding is that it's a simple transformation that eliminates a lot of dummy code, and relies only on convention and not on any other optimizations.)
Nadav Rotem
Comment 4 2013-11-01 16:08:29 PDT
mem2reg should go first, unless we know that FTL generates all of its computations in registers. I know that this is the case for all of the arithmetic calculations but I am not sure about the other stuff.
Filip Pizlo
Comment 5 2013-11-01 19:21:41 PDT
(In reply to comment #4) > mem2reg should go first, unless we know that FTL generates all of its computations in registers. I know that this is the case for all of the arithmetic calculations but I am not sure about the other stuff. Y'all have a point. LowerDFGToLLVM produces very few alloca's so it probably doesn't matter *too* much. I'll changed it.
Filip Pizlo
Comment 6 2013-11-01 19:24:20 PDT
Note You need to log in before you can comment on or make changes to this bug.