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

silviu.baranga at arm.com silviu.baranga at arm.com
Tue Jul 28 06:51:44 PDT 2015


sbaranga added a comment.

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.

> 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.

Thanks,
Silviu


Repository:
  rL LLVM

http://reviews.llvm.org/D10386







More information about the llvm-commits mailing list