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

Eli Friedman eli.friedman at gmail.com
Sat Oct 23 10:17:06 PDT 2010


On Sat, Oct 23, 2010 at 9:07 AM, Kenneth Uildriks <kennethuil at gmail.com> wrote:
> On Sat, Oct 23, 2010 at 9:04 AM, Chris Lattner <clattner at apple.com> wrote:
>> Hi Kenneth,
>>
>> I haven't looked at the patch yet, but how is this different than the standard GVN pass?
>>
>> -Chris
>
> Now that I've looked more closely at GVN, not different enough to
> justify a new pass.
>
> I believe it would benefit from having direct support for
> llvm.invariant.begin and llvm.invariant.end added to it, for the
> reasons I outlined in my first message.
>
> I've noticed that instcombine does redundant load elimination,
> strictly by querying memdep to find the corresponding stores rather
> than doing top-down stored-value tracing like GVN does.  Does it
> handle cases that GVN doesn't?

As far as I know, instcombine doesn't query memdep, and the
store-forwarding is just intended to pick up simple cases to clean up
code before GVN runs.

-Eli




More information about the llvm-commits mailing list