aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-11-20 18:25:24 +0000
committerChris Lattner <sabre@nondot.org>2003-11-20 18:25:24 +0000
commitf8485c643412dbff46fe87ea2867445169a5c28e (patch)
tree47df4c3a7138fa1f6051e38e3faf81613862b616 /lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp
parentadbc0b5287bf36893cdcae2440d48b3cb3489e38 (diff)
Start using the nicer terminator auto-insertion API
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10111 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp')
-rw-r--r--lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp6
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 &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();