[PATCH] D130188: [DependenceAnalysis][PR56275] Normalize dependence analysis results to be non-negative when required

Bardia Mahjour via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 27 06:51:19 PDT 2022


bmahjour added inline comments.


================
Comment at: llvm/lib/Analysis/DependenceAnalysis.cpp:291
+
+bool FullDependence::normalize(ScalarEvolution *SE) {
+  if (!isDirectionNegative())
----------------
congzhe wrote:
> Meinersbur wrote:
> > [serious] This should return a new `FullDependence` object. Modifying the existing object will also modify the object in the pass manager's analysis cache and potentially break any code using it and not expect it to be normalized.
> Thanks, I've updated to make `normalize()` return a new FullDependence object (although copy constructor of `FullDependence` is not allowed), please refer to the most recent update. 
No `Dependence` object is being cached anywhere. A new object is constructed every time `DependenceInfo::depends()` gets called. 


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

https://reviews.llvm.org/D130188



More information about the llvm-commits mailing list