summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp')
-rw-r--r--llvm/lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp b/llvm/lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp
index 9d6107cd2d2..8331781b073 100644
--- a/llvm/lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp
+++ b/llvm/lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp
@@ -145,10 +145,8 @@ void InstLoops::findAndInstrumentBackEdges(Function &F){
ti->setSuccessor(index, newBB);
BasicBlock::InstListType &lt = 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();
OpenPOWER on IntegriCloud