Author: lattner
Date: Wed Dec 12 18:04:46 2007
New Revision: 44965

URL: http://llvm.org/viewvc/llvm-project?rev=44965&view=rev
Log:
Fix for edge profiling, patch by 'Marc' for PR1857

Modified:
    llvm/trunk/lib/Transforms/Instrumentation/EdgeProfiling.cpp

Modified: llvm/trunk/lib/Transforms/Instrumentation/EdgeProfiling.cpp
URL: 
http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/EdgeProfiling.cpp?rev=44965&r1=44964&r2=44965&view=diff

==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/EdgeProfiling.cpp (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/EdgeProfiling.cpp Wed Dec 12 
18:04:46 2007
@@ -84,7 +84,7 @@
           // Okay, we are guaranteed that the edge is no longer critical.  If 
we
           // only have a single successor, insert the counter in this block,
           // otherwise insert it in the successor block.
-          if (TI->getNumSuccessors() == 0) {
+          if (TI->getNumSuccessors() == 1) {
             // Insert counter at the start of the block
             IncrementCounterInBlock(BB, i++, Counters);
           } else {


_______________________________________________
llvm-commits mailing list
llvm-commits@cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

Reply via email to