[PATCH] D126533: [LAA] Relax pointer dependency with runtime pointer checks

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 7 22:20:21 PDT 2022


fhahn added inline comments.


================
Comment at: llvm/lib/Analysis/LoopAccessAnalysis.cpp:1714-1715
+
+    if (APtr != BPtr && (SrcAffine || SinkAffine) &&
+        (SrcInvariant || SinkInvariant))
+      FoundNonConstantDistanceDependence = true;
----------------
dtemirbulatov wrote:
> sdesmalen wrote:
> > This expression doesn't allow the case where `SrcAffine && SinkAffine && !SrcInvariant && !SinkInvariant`.
> > 
> > AIUI the distance can only be computed if:
> > 
> >   (SrcAffine && SinkAffine) ||
> >   (SrcAffine && SinkInvariant) ||
> >   (SrcInvariant && SinkAffine) ||
> >   (SrcInvariant && SinkInvariant)
> > 
> > By the way, I couldn't see any new test-cases. Did you forget to add these, or did I miss something?
> Hmm , For the case if both are invariants we don't need to emit a run-time check and I think we can ignore such cases. For both are affine type pointers I have not considered to support with the change and if I allow it I noticed performance regressions.
It would be good to have at least all those combinations covered in the unit tests. Do you have any insight in the cause for the performance regression. you are seeing?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D126533/new/

https://reviews.llvm.org/D126533



More information about the llvm-commits mailing list