Lines Matching full:we
6 We use opt to do Bytecode-to-bytecode instrumentation. Look at
14 exceeds a threshold, we identify a hot loop and perform second-level
16 target of the back-edge and the branch that causes the back-edge). We
23 We remove the first-level instrumentation by overwriting the CALL to
27 LLVM BasicBlock*s. We only keep track of paths that start at the
30 How do we keep track of which edges to instrument, and which edges are
41 3) Mark BBs which end in edges that exit the hot region; we need to
44 Assume that there is 1 free register. On SPARC we use %g1, which LLC
46 edge which corresponds to a conditional branch, we shift 0 for not
48 through the hot region. Silently fail if we need more than 64 bits.
50 At the end BB we call countPath and increment the counter based on %g1
51 and the return address of the countPath call. We keep track of the
52 number of iterations and the number of paths. We only run this
56 together to form our trace. But we do not allow more than 5 paths; if
57 we have more than 5 we take the ones that are executed the most. We
58 verify our assumption that we picked a hot back-edge in first-level
59 instrumentation, by making sure that the number of times we took an
71 We turn off llvm_first_trigger() calls with NOPs, but this would hide
75 We have a SIGALRM timer that counts time for us. Every time we get a
76 SIGALRM we look at our priority queue of locations where we have
78 with a time when we will next turn instrumentation back on for that
79 call site. If the time has arrived for a particular call site, we pop
87 When we finally generate an optimized trace we first copy the code
94 We copy the code from the original to the instrumentation version
96 each machine code basic block we think is in the hot region into the
97 trace cache. Then we instrument that code. The process is similar for
98 generating the final optimized trace; we copy the same basic blocks
99 because we might need to put in fixup code for exit BBs.
104 We are restricted to using single instructions to branch between the
105 original code, trace, and instrumented code. So we have to keep the
111 We use a dummy function that is full of a bunch of for loops which we
113 whether or not we have enough space in the trace cache, etc.
125 replacement policy; we have found that this is almost as good as LRU
129 We cannot deal with discontiguous trace cache areas. The trace cache
132 We generate instrumentation traces and optimized traces into separate
133 trace caches. We keep the instrumented code around because you don't