[PATCH] D26877: Minor fixes in Loop Strength Reduction

Hal Finkel via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 19 18:15:20 PST 2016


hfinkel added inline comments.


================
Comment at: lib/Transforms/Scalar/LoopStrengthReduce.cpp:2818
   for (const IVInc &Inc : Chain) {
-    DEBUG(dbgs() << "        Inc: " << Inc.UserInst << "\n");
+    DEBUG(dbgs() << "        Inc: " << *Inc.UserInst << "\n");
     auto UseI = find(Inc.UserInst->operands(), Inc.IVOperand);
----------------
This debugging-statement change LGTM; please commit this separately.


================
Comment at: lib/Transforms/Scalar/LoopStrengthReduce.cpp:4149
         Best = Reg;
-      else {
+        BestNum = RegUses.getUsedByIndices(Reg).count();
+      } else {
----------------
Do you have a test case for this change?

If/When you commit this, it should be separate from the other changes.


Repository:
  rL LLVM

https://reviews.llvm.org/D26877





More information about the llvm-commits mailing list