[PATCH] D15139: [IR] Reformulate LLVM's EH funclet IR

Joseph Tremoulet via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 10 10:52:00 PST 2015


JosephTremoulet added inline comments.

================
Comment at: lib/Transforms/Utils/InlineFunction.cpp:1443-1451
@@ +1442,11 @@
+      if (auto *TPI = dyn_cast<TerminatePadInst>(I)) {
+        if (CallSiteEHPad && isa<ConstantTokenNone>(TPI->getOuterScope()))
+          TPI->setOuterScope(CallSiteEHPad);
+      } else if (auto *CatchSwitch = dyn_cast<CatchSwitchInst>(I)) {
+        if (CallSiteEHPad &&
+            isa<ConstantTokenNone>(CatchSwitch->getOuterScope()))
+          CatchSwitch->setOuterScope(CallSiteEHPad);
+      } else {
+        auto *FPI = cast<FuncletPadInst>(I);
+        if (CallSiteEHPad && isa<ConstantTokenNone>(FPI->getOuterScope()))
+          FPI->setOuterScope(CallSiteEHPad);
----------------
I think you can remove `CallSiteEHPad && ` from each of these three tests, as it's redundant with the guarding check up on line 1434.


http://reviews.llvm.org/D15139





More information about the llvm-commits mailing list