[LLVMbugs] [Bug 1857] New: Patch for Edge Profiling Correctness
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Wed Dec 12 10:37:42 PST 2007
http://llvm.org/bugs/show_bug.cgi?id=1857
Summary: Patch for Edge Profiling Correctness
Product: libraries
Version: 2.1
Platform: PC
OS/Version: Linux
Status: NEW
Severity: minor
Priority: P2
Component: Miscellaneous Instrumentation passes
AssignedTo: unassignedbugs at nondot.org
ReportedBy: mdekruijf at gmail.com
CC: llvmbugs at cs.uiuc.edu
The diff below makes edge profiling work correctly. Previously, function and
basic block counts using edge profiling were inconsistent with those found
doing block/function profiling directly. The code now also matches the
comment.
$ svn diff lib/Transforms/Instrumentation/EdgeProfiling.cpp
Index: EdgeProfiling.cpp
===================================================================
--- EdgeProfiling.cpp (revision 4)
+++ EdgeProfiling.cpp (working copy)
@@ -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 {
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list