diff options
Diffstat (limited to 'lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp')
-rw-r--r-- | lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp b/lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp index 9d6107cd2d..8331781b07 100644 --- a/lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp +++ b/lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp @@ -145,10 +145,8 @@ void InstLoops::findAndInstrumentBackEdges(Function &F){ ti->setSuccessor(index, newBB); BasicBlock::InstListType < = newBB->getInstList(); - - Instruction *call = new CallInst(inCountMth); - lt.push_back(call); - lt.push_back(new BranchInst(BB)); + lt.push_back(new CallInst(inCountMth)); + new BranchInst(BB, newBB); //now iterate over *vl, and set its Phi nodes right for(BasicBlock::iterator BB2Inst = BB->begin(), BBend = BB->end(); |