[llvm] r257886 - [CodeGenPrepare] Try and appease sanitizers

James Molloy via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 15 02:36:01 PST 2016


Author: jamesm
Date: Fri Jan 15 04:36:01 2016
New Revision: 257886

URL: http://llvm.org/viewvc/llvm-project?rev=257886&view=rev
Log:
[CodeGenPrepare] Try and appease sanitizers

dupRetToEnableTailCallOpts(BB) can invalidate BB. It must run *after* we iterate across BB!

Modified:
    llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp

Modified: llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp?rev=257886&r1=257885&r2=257886&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp (original)
+++ llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp Fri Jan 15 04:36:01 2016
@@ -5242,7 +5242,6 @@ bool CodeGenPrepare::optimizeBlock(Basic
     if (ModifiedDT)
       return true;
   }
-  MadeChange |= dupRetToEnableTailCallOpts(&BB);
 
   bool MadeBitReverse = true;
   while (TLI && MadeBitReverse) {
@@ -5254,6 +5253,7 @@ bool CodeGenPrepare::optimizeBlock(Basic
       }
     }
   }
+  MadeChange |= dupRetToEnableTailCallOpts(&BB);
   
   return MadeChange;
 }




More information about the llvm-commits mailing list