Fix for edge profiling, patch by 'Marc' for PR1857

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44965 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2007-12-13 00:04:46 +00:00
parent 2e07d33f04
commit 915c656a74

View File

@ -84,7 +84,7 @@ bool EdgeProfiler::runOnModule(Module &M) {
// Okay, we are guaranteed that the edge is no longer critical. If we // Okay, we are guaranteed that the edge is no longer critical. If we
// only have a single successor, insert the counter in this block, // only have a single successor, insert the counter in this block,
// otherwise insert it in the successor block. // otherwise insert it in the successor block.
if (TI->getNumSuccessors() == 0) { if (TI->getNumSuccessors() == 1) {
// Insert counter at the start of the block // Insert counter at the start of the block
IncrementCounterInBlock(BB, i++, Counters); IncrementCounterInBlock(BB, i++, Counters);
} else { } else {