[PATCH] D12434: [WinEH] Teach SimplfyCFG to eliminate empty cleanup pads.

Joseph Tremoulet via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 3 12:49:41 PDT 2015


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

LGTM with one nit, thanks.


================
Comment at: lib/Transforms/Utils/SimplifyCFG.cpp:2993-2995
@@ +2992,5 @@
+ 
+      for (unsigned Idx = 0, E = DestPN->getNumIncomingValues(); Idx != E;
+           ++Idx) {
+        if (DestPN->getIncomingBlock(Idx) == BB) {
+          // This PHI node has an incoming value that corresponds to a control
----------------
Looks like this doesn't need to be a loop anymore, and you can just have `unsigned Idx = DestPN->getBasicBlockIndex(BB)`


Repository:
  rL LLVM

http://reviews.llvm.org/D12434





More information about the llvm-commits mailing list