Lines Matching full:edge
1 //===- EdgeProfiling.cpp - Insert counters for edge profiling -------------===//
10 // This pass instruments the specified program with counters for edge profiling.
11 // Edge profiling can give a reasonable approximation of the hot paths through a
15 // edge in the program, instead of using control flow information to prune the
19 #define DEBUG_TYPE "insert-edge-profiling"
43 return "Edge Profiler";
49 INITIALIZE_PASS(EdgeProfiler, "insert-edge-profiling",
50 "Insert instrumentation for edge profiling", false, false)
57 errs() << "WARNING: cannot insert edge profiling into a module"
66 // Reserve space for (0,entry) edge.
87 // Create counter for (0,entry) edge.
91 // Okay, we have to add a counter of each outgoing edge. If the
92 // outgoing edge is not critical don't split it, just insert the counter
93 // in the source or destination of the edge.
96 // If the edge is critical, split it.
99 // Okay, we are guaranteed that the edge is no longer critical. If we