[llvm-branch-commits] [llvm-branch] r106150 - in /llvm/branches/Apple/Troughton: ./ lib/Analysis/ScalarEvolutionExpander.cpp

Jim Grosbach grosbach at apple.com
Wed Jun 16 14:14:35 PDT 2010


Author: grosbach
Date: Wed Jun 16 16:14:35 2010
New Revision: 106150

URL: http://llvm.org/viewvc/llvm-project?rev=106150&view=rev
Log:
merge 106149

Modified:
    llvm/branches/Apple/Troughton/   (props changed)
    llvm/branches/Apple/Troughton/lib/Analysis/ScalarEvolutionExpander.cpp

Propchange: llvm/branches/Apple/Troughton/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jun 16 16:14:35 2010
@@ -1 +1 @@
-/llvm/trunk:105358,105361,105369,105372,105399,105427,105437,105439,105441,105470,105473,105481,105498,105541,105554,105557,105585-105586,105634,105653,105665,105669,105677,105745,105749,105774-105775,105836,105845,105862,105938,105959,105965,105969,105982,105990-105991,105997-105998,106004,106021,106024,106051
+/llvm/trunk:105358,105361,105369,105372,105399,105427,105437,105439,105441,105470,105473,105481,105498,105541,105554,105557,105585-105586,105634,105653,105665,105669,105677,105745,105749,105774-105775,105836,105845,105862,105938,105959,105965,105969,105982,105990-105991,105997-105998,106004,106021,106024,106051,106146,106149

Modified: llvm/branches/Apple/Troughton/lib/Analysis/ScalarEvolutionExpander.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Troughton/lib/Analysis/ScalarEvolutionExpander.cpp?rev=106150&r1=106149&r2=106150&view=diff
==============================================================================
--- llvm/branches/Apple/Troughton/lib/Analysis/ScalarEvolutionExpander.cpp (original)
+++ llvm/branches/Apple/Troughton/lib/Analysis/ScalarEvolutionExpander.cpp Wed Jun 16 16:14:35 2010
@@ -97,7 +97,7 @@
           BasicBlock::iterator It = I; ++It;
           if (isa<InvokeInst>(I))
             It = cast<InvokeInst>(I)->getNormalDest()->begin();
-          while (isa<PHINode>(It)) ++It;
+          while (isa<PHINode>(It) || isa<DbgInfoIntrinsic>(It)) ++It;
           if (It != BasicBlock::iterator(CI)) {
             // Recreate the cast after the user.
             // The old cast is left in place in case it is being used
@@ -115,7 +115,7 @@
   BasicBlock::iterator IP = I; ++IP;
   if (InvokeInst *II = dyn_cast<InvokeInst>(I))
     IP = II->getNormalDest()->begin();
-  while (isa<PHINode>(IP)) ++IP;
+  while (isa<PHINode>(IP) || isa<DbgInfoIntrinsic>(IP)) ++IP;
   Instruction *CI = CastInst::Create(Op, V, Ty, V->getName(), IP);
   rememberInstruction(CI);
   return CI;
@@ -1070,7 +1070,8 @@
     BasicBlock::iterator SaveInsertPt = Builder.GetInsertPoint();
     BasicBlock::iterator NewInsertPt =
       llvm::next(BasicBlock::iterator(cast<Instruction>(V)));
-    while (isa<PHINode>(NewInsertPt)) ++NewInsertPt;
+    while (isa<PHINode>(NewInsertPt) || isa<DbgInfoIntrinsic>(NewInsertPt))
+      ++NewInsertPt;
     V = expandCodeFor(SE.getTruncateExpr(SE.getUnknown(V), Ty), 0,
                       NewInsertPt);
     restoreInsertPoint(SaveInsertBB, SaveInsertPt);





More information about the llvm-branch-commits mailing list