org.jikesrvm.compilers.opt.mir2mc.ia32
Class FinalMIRExpansion

java.lang.Object
  extended by org.jikesrvm.compilers.opt.ir.IRTools
      extended by org.jikesrvm.compilers.opt.mir2mc.ia32.FinalMIRExpansion
Direct Known Subclasses:
ArchitectureSpecificOpt.FinalMIRExpansion

public class FinalMIRExpansion
extends IRTools

Final acts of MIR expansion for the IA32 architecture. Things that are expanded here (immediately before final assembly) should only be those sequences that cannot be expanded earlier due to difficulty in keeping optimizations from interfering with them.

One job of this phase is to handle the expansion of the remains of table switch. The code looks like a mess (which it is), but there is little choice for relocatable IA32 code that does this. And the details of this code are shared with the baseline compiler and dependent in detail on the Assembler (see Assembler.emitOFFSET_Imm_ImmOrLabel(int, int, int)). If you want to mess with it, you will probably need to mess with them as well.


Constructor Summary
FinalMIRExpansion()
           
 
Method Summary
static int expand(IR ir)
           
private static void expandFClear(Instruction s, IR ir)
          expand an FCLEAR pseudo-insruction using FFREEs.
private static void expandFmov(Instruction s, PhysicalRegisterSet phys)
          expand an FMOV pseudo-insruction.
private static void expandUnconditionalYieldpoint(Instruction s, IR ir, RVMMethod meth)
           
private static void expandYieldpoint(Instruction s, IR ir, RVMMethod meth, IA32ConditionOperand ypCond)
           
 
Methods inherited from class org.jikesrvm.compilers.opt.ir.IRTools
A, AC, AC, CPOS, CR, D, DC, defDoublesAsUse, definedIn, F, FC, getCondMoveOp, getDefaultOperand, getLoadOp, getLoadOp, getMoveOp, getStoreOp, getStoreOp, I, IC, insertInstructionsAfter, L, LC, makeBlockOnEdge, mayBeVolatileFieldLoad, moveInstruction, moveIntoRegister, moveIntoRegister, nonPEIGC, TG, usedIn, useDoublesAsDef
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FinalMIRExpansion

public FinalMIRExpansion()
Method Detail

expand

public static int expand(IR ir)
Parameters:
ir - the IR to expand
Returns:
return value is garbage for IA32

expandFClear

private static void expandFClear(Instruction s,
                                 IR ir)
expand an FCLEAR pseudo-insruction using FFREEs.

Parameters:
s - the instruction to expand
ir - the containing IR

expandFmov

private static void expandFmov(Instruction s,
                               PhysicalRegisterSet phys)
expand an FMOV pseudo-insruction.

Parameters:
s - the instruction to expand
phys - controlling physical register set

expandYieldpoint

private static void expandYieldpoint(Instruction s,
                                     IR ir,
                                     RVMMethod meth,
                                     IA32ConditionOperand ypCond)

expandUnconditionalYieldpoint

private static void expandUnconditionalYieldpoint(Instruction s,
                                                  IR ir,
                                                  RVMMethod meth)