[PATCH] D10386: [LAA] Merge memchecks for accesses separated by a constant offset

Adam Nemet anemet at apple.com
Tue Jul 28 16:55:24 PDT 2015


anemet added a comment.

In http://reviews.llvm.org/D10386#213466, @sbaranga wrote:

> Thanks for looking into this!
>
> In http://reviews.llvm.org/D10386#208783, @anemet wrote:
>
> > Ah, OK, I think I understand what's going on.
> >
> > We simply can't have memchecks between pointers of the same underlying objects *unless* shouldRetryWithRuntimeChecks.  I don't think that this what you were trying to explain but if yes, sorry for not understanding.
> >
> > Anyhow, I think in this case the code is good, we just have to explain the situation in the comment before the UseDependenies check (was this the only reason for the check?).  I.e. why the offending check can only occur with shouldRetryWithRuntimeChecks.
>
>
> We also need this for correctness. The algorithm assumes that pointers in the same equivalence class don't need checking against each other, which would be false in this case.


Yep.

> 

> 

> > Please also mention shouldRetryWithRuntimeChecks in the testcase you added earlier.  It took me a while to figure out why we wanted to compare pointers with the same underlying object.  (That is kinda the point.)

> 

> 

> I've added comments to explain this in r243416.


Excellent, thank you!

> Thanks,

> Silviu





Repository:
  rL LLVM

http://reviews.llvm.org/D10386







More information about the llvm-commits mailing list