org.jikesrvm.compilers.opt.inlining
Class Inliner

java.lang.Object
  extended by org.jikesrvm.compilers.opt.inlining.Inliner

public class Inliner
extends Object

This class contains the high level logic for executing an inlining decision.

See Also:
InlineDecision, GenerationContext

Field Summary
private static boolean COUNT_FAILED_GUARDS
          The following flag enables debug counters and requires an adaptive boot image and flag "INSERT_DEBUGGING_COUNTERS" to be true.
 
Constructor Summary
Inliner()
           
 
Method Summary
static GenerationContext execute(InlineDecision inlDec, GenerationContext parent, ExceptionHandlerBasicBlockBag ebag, Instruction callSite)
          Return a generation context that represents the execution of inlDec in the context <parent,ebag> for the call instruction callSite.
static void execute(InlineDecision inlDec, IR ir, Instruction callSite)
          Execute an inlining decision inlDec for the CALL instruction callSite that is contained in ir.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

COUNT_FAILED_GUARDS

private static final boolean COUNT_FAILED_GUARDS
The following flag enables debug counters and requires an adaptive boot image and flag "INSERT_DEBUGGING_COUNTERS" to be true. See instrumentation section of the user guide for more information.

See Also:
Constant Field Values
Constructor Detail

Inliner

public Inliner()
Method Detail

execute

public static void execute(InlineDecision inlDec,
                           IR ir,
                           Instruction callSite)
Execute an inlining decision inlDec for the CALL instruction callSite that is contained in ir.

Parameters:
inlDec - the inlining decision to execute
ir - the governing IR
callSite - the call site to inline

execute

public static GenerationContext execute(InlineDecision inlDec,
                                        GenerationContext parent,
                                        ExceptionHandlerBasicBlockBag ebag,
                                        Instruction callSite)
Return a generation context that represents the execution of inlDec in the context <parent,ebag> for the call instruction callSite.

PRECONDITION: inlDec.isYes()

POSTCONDITIONS: Let gc be the returned generation context.

Parameters:
inlDec - the inlining decision to execute
parent - the caller generation context
ebag - exception handler scope for the caller
callSite - the callsite to execute
Returns:
a generation context that represents the execution of the inline decision in the given context