public final class ExpandFPRStackConvention extends CompilerPhase
However, BURS may consume FP stack locations by inserting instructions that push or pop the floating-point stack. This phase inserts dummy definitions and uses to indicate when symbolic FP registers are not available for register allocation since BURS has consumed a stack slot. For example,
FLD t1 ... FSTP M, t1will be modified by this phase to indicate that FP6 is not available for allocation in the interval:
DUMMY_DEF FP6 FLD t1 ..... FSTP M, t1 DUMMY_USE FP6
Additionally, by convention, we will always clear the floating-point stack when delivering an exception. To model this, we insert dummy defs and uses for each floating-point register at the beginning of each catch block.
Modifier and Type | Field and Description |
---|---|
private static int |
NUM_ALLOCATABLE_FPR
The number of FPRs available for allocation.
|
container
Constructor and Description |
---|
ExpandFPRStackConvention() |
Modifier and Type | Method and Description |
---|---|
String |
getName() |
CompilerPhase |
newExecution(IR ir)
Return this instance of this phase.
|
void |
perform(IR ir)
Insert the needed dummy defs and uses.
|
boolean |
printingEnabled(OptOptions options,
boolean before)
Returns true if the phase wants the IR dumped before and/or after it runs.
|
dumpIR, dumpIR, getClassConstructor, getCompilerPhaseConstructor, getCompilerPhaseConstructor, performPhase, reportAdditionalStats, setContainer, shouldPerform, verify
private static final int NUM_ALLOCATABLE_FPR
public ExpandFPRStackConvention()
public CompilerPhase newExecution(IR ir)
newExecution
in class CompilerPhase
ir
- not usedpublic boolean printingEnabled(OptOptions options, boolean before)
CompilerPhase
printingEnabled
in class CompilerPhase
options
- the compiler options for the compilationbefore
- true when invoked before perform, false otherwise.public String getName()
getName
in class CompilerPhase
public void perform(IR ir)
perform
in class CompilerPhase
ir
- the IR on which to apply the phase