[PATCH] Merge empty landing pads in SimplifyCFG

Philip Reames listmail at philipreames.com
Thu Mar 12 15:11:18 PDT 2015


================
Comment at: lib/Transforms/Utils/SimplifyCFG.cpp:4462
@@ +4461,3 @@
+  if (LandingPadInst *LPad = dyn_cast<LandingPadInst>(I)) {
+    for (++I; isa<DbgInfoIntrinsic>(I); ++I) {}
+    if (I->isTerminator() &&
----------------
andrew.w.kaylor wrote:
> If I'm reading this right these debug intrinsics just get thrown away if a merge is performed.  Do they not contain anything that might be different from the corresponding debug intrinsics in the potential merge block?
This is correct.  dbg intriniscs are not allowed to modify optimization or code gen.  You're right that we could contain them if they were the same though.  

Actually, there's a bug here.  I need to remove *both* sets of debug intrinsics if I they're not the same.

http://reviews.llvm.org/D8297

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






More information about the llvm-commits mailing list