use of org.jikesrvm.compilers.opt.OptOptions in project JikesRVM by JikesRVM.
the class SplitBasicBlockTest method createIRWithEmptyCFG.
private IR createIRWithEmptyCFG(int maxInstPerBlock) {
OptOptions opts = new OptOptions();
IR ir = new IR(null, null, opts);
opts.L2M_MAX_BLOCK_SIZE = maxInstPerBlock;
TestingTools.addEmptyCFGToIR(ir);
return ir;
}
use of org.jikesrvm.compilers.opt.OptOptions 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);
}
use of org.jikesrvm.compilers.opt.OptOptions 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));
}
use of org.jikesrvm.compilers.opt.OptOptions in project JikesRVM by JikesRVM.
the class OptTestHarnessTest method usesSameOptionsAsBootimageCompilerWhenRequested.
// Note: this test will break when the bootimage options change
@Test
@Category(RequiresOptCompiler.class)
public void usesSameOptionsAsBootimageCompilerWhenRequested() throws Exception {
String[] useBootimageCompilerOptions = { "-useBootOptions" };
output = new TestOutput();
OptOptions optOptions = new OptOptions();
optOptions.INLINE_GUARDED = !optOptions.guardWithCodePatch();
OptTestHarness oth = new OptTestHarness(output, optOptions, new TestFileAccess());
oth.mainMethod(useBootimageCompilerOptions);
assertThatNoAdditionalErrorsHaveOccurred();
assertThat(oth.options.INLINE_GUARDED, is(optOptions.guardWithCodePatch()));
}
use of org.jikesrvm.compilers.opt.OptOptions in project JikesRVM by JikesRVM.
the class OptTestHarnessTest method executeOTHWithStreamRedirection.
private void executeOTHWithStreamRedirection(String[] othArguments) throws InvocationTargetException, IllegalAccessException {
try {
output = new TestOutput();
fileAccess = new TestFileAccess();
redirectStandardStreams();
OptTestHarness oth = new OptTestHarness(output, new OptOptions(), fileAccess);
oth.mainMethod(othArguments);
} finally {
resetStandardStreams();
}
}
Aggregations