Search in sources :

Example 1 with MIRInfo

use of org.jikesrvm.compilers.opt.ir.MIRInfo in project JikesRVM by JikesRVM.

the class ActiveSetTest method createActiveSetFromRegisterAllocatorState.

private ActiveSet createActiveSetFromRegisterAllocatorState(RegisterAllocatorState state) throws Exception {
    NormalMethod nm = TestingTools.getNormalMethod(MethodsForTests.class, "emptyStaticMethodWithoutAnnotations");
    OptOptions opts = new OptOptions();
    IR ir = new IR(nm, null, opts);
    ir.MIRInfo = new MIRInfo(ir);
    ir.MIRInfo.regAllocState = state;
    SpillLocationManager spillLocManager = new SpillLocationManager(ir);
    this.spillLocations = spillLocManager;
    return new ActiveSet(ir, spillLocManager, null);
}
Also used : MIRInfo(org.jikesrvm.compilers.opt.ir.MIRInfo) NormalMethod(org.jikesrvm.classloader.NormalMethod) IR(org.jikesrvm.compilers.opt.ir.IR) OptOptions(org.jikesrvm.compilers.opt.OptOptions)

Example 2 with MIRInfo

use of org.jikesrvm.compilers.opt.ir.MIRInfo in project JikesRVM by JikesRVM.

the class ActiveSetTest method findAvailableRegisterIgnoresInfrequentIntervalsWhenDesired.

@Test
public void findAvailableRegisterIgnoresInfrequentIntervalsWhenDesired() throws Exception {
    NormalMethod nm = TestingTools.getNormalMethod(MethodsForTests.class, "emptyStaticMethodWithoutAnnotations");
    OptOptions opts = new OptOptions();
    opts.FREQ_FOCUS_EFFORT = true;
    IR ir = new IR(nm, null, opts);
    ir.MIRInfo = new MIRInfo(ir);
    SpillLocationManager spillLocManager = new SpillLocationManager(ir);
    this.spillLocations = spillLocManager;
    ActiveSet active = new ActiveSet(ir, spillLocManager, null);
    CompoundInterval infrequentCode = new CompoundInterval(null);
    assertNull(active.findAvailableRegister(infrequentCode));
}
Also used : MIRInfo(org.jikesrvm.compilers.opt.ir.MIRInfo) NormalMethod(org.jikesrvm.classloader.NormalMethod) IR(org.jikesrvm.compilers.opt.ir.IR) OptOptions(org.jikesrvm.compilers.opt.OptOptions) Test(org.junit.Test)

Aggregations

NormalMethod (org.jikesrvm.classloader.NormalMethod)2 OptOptions (org.jikesrvm.compilers.opt.OptOptions)2 IR (org.jikesrvm.compilers.opt.ir.IR)2 MIRInfo (org.jikesrvm.compilers.opt.ir.MIRInfo)2 Test (org.junit.Test)1