[PATCH] D10577: [LoopDist/LoopVer] Move LoopVersioning to a new module, NFC

Adam Nemet anemet at apple.com
Thu Jul 2 10:50:51 PDT 2015


anemet marked 2 inline comments as done.
anemet added a comment.

Hi Ashutosh,

In http://reviews.llvm.org/D10577#198383, @ashutosh.nema wrote:

> memcheck no-alias resulting branch is original loop(VersionedLoop).
>  & memcheck alias resulting branch is newly created loop(NonVersionedLoop).
>
> Any specific reason you kept memcheck branch target like this ?
>
> Why can't memcheck no-alias resulting branch targets to NonVersionedLoop
>  and alias resulting branch targets to VersionedLoop ?
>
> In current implementation if loopVersioningLICM attempts to set no-alias attribute to the VersionedLoop
>  that is actually it will set no-alias attribute to the original loop.
>
> I'm doubtful here because the variables of the original loop might be used out of loop in that function. 
>  after setting no-alias it might change the intent of program.
>
> My understanding might be wrong here, please clarify.


The loops flow into a join where the values used outside are merge with phis.  So outside users will see the value from whichever way we arrived.  If we had an alias the value will come from the non-versioned loop and vice-versa.

Let me know if this helps.

Adam


http://reviews.llvm.org/D10577







More information about the llvm-commits mailing list