[PATCH] This patch introduces MemorySSA, a virtual SSA form for memory.Details on what it looks like are in MemorySSA.h

Sanjoy Das sanjoy at playingwithpointers.com
Tue Feb 24 18:14:05 PST 2015


> We don't treat it specially, we actually do exactly what you say.
> We could just pick any argument and end up with the same results. We just
> happen to figure it's most likely to find the version closest to the top of
> the function, which is most likely to be the highest (in the dominator tree)
> version we are trying to reach.
> Otherwise,  we always check to make sure the version of all arguments agree.

Thanks, this makes sense now.

A related question:  is it correct (and profitable) to do this:
MU->setUseOperand(getClobberingMemoryAccess(MU->getMemoryInst())?
Does it make sense for the MemorySSA pass to apply this transform to a
fixed point, especially at higher optimization levels?

-- Sanjoy

>
> There is one caveat here: We have to skip cyclic phi node arguments (IE
> arguments that lead us back to this phi node). So we can't pick one of those
> to be the argument to check against :)

>
>
>
>
>> It's
>> http://reviews.llvm.org/D7864
>>
>> EMAIL PREFERENCES
>>   http://reviews.llvm.org/settings/panel/emailpreferences/
>>
>>
>



More information about the llvm-commits mailing list