[llvm-commits] [PATCH] Promote all possible memory to registers

Kenneth Uildriks kennethuil at gmail.com
Sun Oct 17 14:23:00 PDT 2010


On Sun, Oct 17, 2010 at 3:07 PM, Anton Korobeynikov
<anton at korobeynikov.info> wrote:
> Hi Kenneth,
>
>> This is a new pass, activated by the "-allmem2reg" switch for opt.  It
>> is a generalization of the SSA algorithm, attempting to promote all
>> non-volatile loads within a function, not just those from alloca's
>> which haven't had their address taken.
> Have you measured the impact of this pass? Both in compilation time
> and new optimization opportunities?
>
> --
> With best regards, Anton Korobeynikov
> Faculty of Mathematics and Mechanics, Saint Petersburg State University
>

I should have some performance numbers this week.  I apologize for the
oversight.

As for new optimization opportunities, better support for
llvm.invariant (and other declarations we end up enabling front-ends
to use to communicate assumptions to LLVM about memory & pointer
usage) will help us cut down on clobbers from external function calls,
construct better call graphs (i.e., ones that include indirect calls
where the targets can be narrowed down to a finite set), devirtualize
more indirect calls, and so forth.  Without the use of such
declarations, the impact of this pass on loads and stores would be
similar to that of mem2reg + instcombine, unless I messed up the
implementation somewhere.




More information about the llvm-commits mailing list