[PATCH] D35122: [LoopInterchange] Add some optimization remarks.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 13 07:04:28 PDT 2017


fhahn added inline comments.


================
Comment at: lib/Transforms/Scalar/LoopInterchange.cpp:596-600
+      ORE->emit(OptimizationRemarkMissed("loop-interchange",
+                                         "InterchangeNotProfitable",
+                                         InnerLoop->getStartLoc(),
+                                         InnerLoop->getHeader())
+                << "Interchanging loops is not profitable.");
----------------
anemet wrote:
> anemet wrote:
> > Based on the experience in the inliner, it's helpful to emit the estimated cost and the threshold for such remarks.  Then the user would know how much to lower the threshold, etc.   You may want to issue this in inProfitable.
> Are you planning to address this too?
ah yes, of course!


================
Comment at: lib/Transforms/Scalar/LoopInterchange.cpp:929-934
+    ORE->emit(OptimizationRemarkMissed(DEBUG_TYPE,
+                                       "CurrentLimitations",
+                                       InnerLoop->getStartLoc(),
+                                       InnerLoop->getHeader())
+              << "Found unsupported instruction between induction variable "
+                 "increment and branch.");
----------------
anemet wrote:
> Indentation seems off, you may want to clang-format the diff.
Agreed that it looks off. When viewing in my editor, the first '<' is aligned with the `O` though, so that should be OK?


https://reviews.llvm.org/D35122





More information about the llvm-commits mailing list