diff options
author | Dan Gohman <gohman@apple.com> | 2010-06-22 15:08:57 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-06-22 15:08:57 +0000 |
commit | d2d1ae105d34209682d794c367f1df1cb23711c5 (patch) | |
tree | 940f256bdfe3a69cf8ee0f56294046e10bdc6376 /llvm/lib/Transforms/Instrumentation/OptimalEdgeProfiling.cpp | |
parent | a46d66122ff571006ba7ce77ed5b5ad04b113c8a (diff) | |
download | bcm5719-llvm-d2d1ae105d34209682d794c367f1df1cb23711c5.tar.gz bcm5719-llvm-d2d1ae105d34209682d794c367f1df1cb23711c5.zip |
Use pre-increment instead of post-increment when the result is not used.
llvm-svn: 106542
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/OptimalEdgeProfiling.cpp')
-rw-r--r-- | llvm/lib/Transforms/Instrumentation/OptimalEdgeProfiling.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/OptimalEdgeProfiling.cpp b/llvm/lib/Transforms/Instrumentation/OptimalEdgeProfiling.cpp index 5650150218c..41e3a39f268 100644 --- a/llvm/lib/Transforms/Instrumentation/OptimalEdgeProfiling.cpp +++ b/llvm/lib/Transforms/Instrumentation/OptimalEdgeProfiling.cpp @@ -143,7 +143,7 @@ bool OptimalEdgeProfiler::runOnModule(Module &M) { ProfileInfo::Edge edge = ProfileInfo::getEdge(0,entry); if (!std::binary_search(MST.begin(), MST.end(), edge)) { printEdgeCounter(edge,entry,i); - IncrementCounterInBlock(entry, i, Counters); NumEdgesInserted++; + IncrementCounterInBlock(entry, i, Counters); ++NumEdgesInserted; Initializer[i++] = (Zero); } else{ Initializer[i++] = (Uncounted); @@ -166,7 +166,7 @@ bool OptimalEdgeProfiler::runOnModule(Module &M) { ProfileInfo::Edge edge = ProfileInfo::getEdge(BB,0); if (!std::binary_search(MST.begin(), MST.end(), edge)) { printEdgeCounter(edge,BB,i); - IncrementCounterInBlock(BB, i, Counters); NumEdgesInserted++; + IncrementCounterInBlock(BB, i, Counters); ++NumEdgesInserted; Initializer[i++] = (Zero); } else{ Initializer[i++] = (Uncounted); @@ -189,11 +189,11 @@ bool OptimalEdgeProfiler::runOnModule(Module &M) { if (TI->getNumSuccessors() == 1) { // Insert counter at the start of the block printEdgeCounter(edge,BB,i); - IncrementCounterInBlock(BB, i, Counters); NumEdgesInserted++; + IncrementCounterInBlock(BB, i, Counters); ++NumEdgesInserted; } else { // Insert counter at the start of the block printEdgeCounter(edge,Succ,i); - IncrementCounterInBlock(Succ, i, Counters); NumEdgesInserted++; + IncrementCounterInBlock(Succ, i, Counters); ++NumEdgesInserted; } Initializer[i++] = (Zero); } else { |