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

silviu.baranga at arm.com silviu.baranga at arm.com
Fri Jul 17 08:48:41 PDT 2015


sbaranga added a comment.

In http://reviews.llvm.org/D10386#206174, @anemet wrote:

> Hi Silviu,
>
> In http://reviews.llvm.org/D10386#205474, @sbaranga wrote:
>
> > Looking at the logic in analyzeLoops:
> >
> > In order to need memory checks, first we need Accesses.isDependencyCheckNeeded() to evaluate to true.
> >  Since we need an unknown dependence between two objects to get into the 'veto' case, it follows that areDepsSafe will return false (we have al least one unknown dependence).
> >
> > This causes us to take the "!CanVecMem && DepChecker.shouldRetryWithRuntimeCheck()" branch and reset the dependence checks, which in turn will cause us to not group pointers.
>
>
> shouldRetry... should only be set if we didn't find a constant distance between the accesses.  This is why I said earlier that:
>
> The problem is that we can have unknown distance between pointers of the same underlying object also if the stride is unknown (look for the return Dependence::Unknown before the ShouldRetryWithRuntimeCheck in isDependent). In this case we don't give up on dependence analysis so your flag would still be true.
>
> Was something unclear about this?  I can help to come up with a testcase for this if that helps.
>
> Adam


I think I'm getting tunnel vision on this.. I would be really grateful if you could help to come up with a testcase.

Thanks,
Silviu


Repository:
  rL LLVM

http://reviews.llvm.org/D10386







More information about the llvm-commits mailing list