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

Michael Kruse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 22 13:05:46 PDT 2022


Meinersbur added a comment.

I think I would prefer the request for normalization on the `depends()` call, rather that the `DependenceInfo` constructor. This keeps it closer to the code that either expects normalized dependencies, or dependencies that expect it to correspond to which instructions were passed as either `Src` or `Dst`. Also, If DependenceInfo would be used as an analysis in a pass manager, having a `NeedsNormalize=true` instance of DependenceInfo in the analysis cache will break any pass that expect the other interpretation.



================
Comment at: llvm/lib/Analysis/DependenceAnalysis.cpp:124-127
+static cl::opt<bool> NormalizeResults(
+    "da-normalize-results", cl::init(false), cl::Hidden,
+    cl::desc("Normalize the direction and distance vectors to make "
+             "them non-negative."));
----------------
[serious] This flag breaks any code that expects non-normalized dependences.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130188



More information about the llvm-commits mailing list