[PATCH] Merge empty landing pads in SimplifyCFG

Sanjoy Das sanjoy at playingwithpointers.com
Thu Mar 12 16:50:34 PDT 2015


Minor drive-by comments inline.


================
Comment at: lib/Transforms/Utils/SimplifyCFG.cpp:4423
@@ +4422,3 @@
+    Succs.insert(succ_begin(BB), succ_end(BB));
+    for (BasicBlock *Succ : Succs) {
+      Succ->removePredecessor(BB);
----------------
Isn't there only one successor, `Succ`?

================
Comment at: lib/Transforms/Utils/SimplifyCFG.cpp:4460
@@ +4459,3 @@
+  // See if we can merge an empty landing pad block with another which is
+  // equivelent.
+  if (LandingPadInst *LPad = dyn_cast<LandingPadInst>(I)) {
----------------
Nit: should be "equivalent"

http://reviews.llvm.org/D8297

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list