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

Dinar Temirbulatov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 2 08:19:37 PDT 2022


dtemirbulatov marked 4 inline comments as done.
dtemirbulatov added inline comments.


================
Comment at: llvm/lib/Analysis/LoopAccessAnalysis.cpp:1714-1715
+
+    if (APtr != BPtr && (SrcAffine || SinkAffine) &&
+        (SrcInvariant || SinkInvariant))
+      FoundNonConstantDistanceDependence = true;
----------------
sdesmalen wrote:
> dtemirbulatov wrote:
> > dtemirbulatov wrote:
> > > fhahn wrote:
> > > > 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?
> > > Added dedicated test.
> > just extra check instructions with a small number of iterations.
> > For both are affine type pointers I have not considered to support with the change and if I allow it I noticed performance regressions
> Do you know why there are performance regressions? 
> 
Sorry for missing that, Done.


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

https://reviews.llvm.org/D126533



More information about the llvm-commits mailing list