[PATCH] D25286: Ignore debug info when making optimization decisions in SimplifyCFG.

James Molloy via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 17 05:18:01 PDT 2016


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

Sorry this took so long. LGTM.



================
Comment at: lib/Transforms/Utils/SimplifyCFG.cpp:1484
+    } while (isa<DbgInfoIntrinsic>(I) && I != &BB->front());
+    if (!isa<DbgInfoIntrinsic>(I))
+      Insts.push_back(I);
----------------
danielcdh wrote:
> jmolloy wrote:
> > You shouldn't have to check this here, because canSinkLastInstruction should have checked it. 
> > 
> > Sidenote: I think you need to make sure it's checked in canSinkLastInstruction :)
> But canSinkLastInstruction only skips the DbgInfoIntrinsic. If we don't have the logic here, I0 may end up being a DbgInfoIntrinsic?
Ah yes, you're right.


https://reviews.llvm.org/D25286





More information about the llvm-commits mailing list