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

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 31 14:15:42 PDT 2015


rnk added inline comments.

================
Comment at: lib/Transforms/Utils/SimplifyCFG.cpp:2903-2904
@@ -2901,1 +2902,4 @@
 
+// FIXME: This seems like a pretty common thing to want to do.  Consider
+// whether there is a more accessible place to put this.
+static void convertInvokeToCall(InvokeInst *II) {
----------------
We usually drop these kinds of utilities in llvm/lib/Transforms/Utils/Local.cpp. You can make llvm/Transforms/Utils/LowerInvoke.cpp use it too.

================
Comment at: lib/Transforms/Utils/SimplifyCFG.cpp:2906
@@ +2905,3 @@
+static void convertInvokeToCall(InvokeInst *II) {
+    SmallVector<Value*, 8> Args(II->op_begin(), II->op_end() - 3);
+    // Insert a call instruction before the invoke.
----------------
2-space indent


Repository:
  rL LLVM

http://reviews.llvm.org/D12434





More information about the llvm-commits mailing list