[PATCH] D40146: [JumpThreading] Deferred preservation of DT and LVI across the pass.

Sebastian Pop via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 6 19:54:21 PST 2017


sebpop accepted this revision.
sebpop added a comment.
This revision is now accepted and ready to land.

The patch looks good to me.
Please address the few inline comments and commit.

Thanks!



================
Comment at: llvm/lib/Transforms/Scalar/JumpThreading.cpp:2025
+    SplitLandingPadPredecessors(BB, Preds, Suffix, NewName.c_str(), NewBBs);
+  } else
+    NewBBs.push_back(SplitBlockPredecessors(BB, Preds, Suffix));
----------------
Please add braces around the else clause.


================
Comment at: llvm/lib/Transforms/Utils/Local.cpp:1858
       I = F.getBasicBlockList().erase(I);
-    else
-      ++I;
+      --I; // We deleted a block and need to "freeze" incrementing.
+    }
----------------
Please move the ++I back in the body of the for loop and remove --I.


https://reviews.llvm.org/D40146





More information about the llvm-commits mailing list