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

Chris Lattner clattner at apple.com
Sat Oct 23 07:04:35 PDT 2010


Hi Kenneth,

I haven't looked at the patch yet, but how is this different than the standard GVN pass?

-Chris

On Oct 17, 2010, at 11:23 PM, Kenneth Uildriks <kennethuil at gmail.com> wrote:

> 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.
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list