|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectharpoon.Analysis.Quads.DeepInliner.DeepInliner
public class DeepInliner
DeepInliner
contains the code responsible with
inlining a set of InlineChain
s. Each
InlineChain
corresponds to a chain of several calls
(simple inlining, when we inline call paths of length one, is a
trivial special case). Clients of this class should invoke the
static method DeepInliner.inline
The inlining is performed eagerly, by mutating the code of the
affected methods, as cached by the CachingCodeFactory
that is passed as the first argument of inline
. The
alternative would be to construct an HCodeFactory
that
generates the code of the affected methods on demand; however, the
complications of inlining multiple InlineChain
s forces
us to perform the inlining eagerly.
Among these complications, we mention the desire to inline the "best version" of a callee, i.e., the code of the callee after the callee-relevant inlining has already been performed. Hence, the order in which we process the inline chains is not irrelevant. Also, the implementation is careful to act efficiently if several calling chains contain the same call.
InlineChain
Method Summary | |
---|---|
static void |
inline(CachingCodeFactory ccf,
Collection<InlineChain> ics,
CallGraph cg)
Inline a set of InlineChain s. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void inline(CachingCodeFactory ccf, Collection<InlineChain> ics, CallGraph cg)
InlineChain
s.
ccf
- Caching code factory. Must produce either RSSx or
QuadNoSSA (the code is simply too hard to generate for other
intermediate representations, like SSA and SSI).ics
- Collection of desired InlineChain
.cg
- Call-graph. DOES NOT need to be a whole-program
call graph: it just needs to give us the callees for all the
call sites involved in the inline chains from
cs
.InlineChain
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |