[llvm-commits] [llvm] r65979 - /llvm/trunk/lib/Transforms/Utils/Local.cpp

Dale Johannesen dalej at apple.com
Tue Mar 3 15:30:00 PST 2009


Author: johannes
Date: Tue Mar  3 17:30:00 2009
New Revision: 65979

URL: http://llvm.org/viewvc/llvm-project?rev=65979&view=rev
Log:
Marking debug info intrinsics as not touching memory
caused them to be considered trivially dead.  Fix this.


Modified:
    llvm/trunk/lib/Transforms/Utils/Local.cpp

Modified: llvm/trunk/lib/Transforms/Utils/Local.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/Local.cpp?rev=65979&r1=65978&r2=65979&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Utils/Local.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/Local.cpp Tue Mar  3 17:30:00 2009
@@ -159,6 +159,9 @@
 bool llvm::isInstructionTriviallyDead(Instruction *I) {
   if (!I->use_empty() || isa<TerminatorInst>(I)) return false;
 
+  // We don't want debug info removed by anything this general.
+  if (isa<DbgInfoIntrinsic>(I)) return false;
+    
   if (!I->mayWriteToMemory())
     return true;
 





More information about the llvm-commits mailing list