# HG changeset patch # User Josef Eisl # Date 1428937221 -7200 # Node ID c6545476bc7719a5d14ae63da9a910e31db95d0f # Parent 6daa0fd4af52cc86ae568415a425191127a54bf8 RegisterAllocationConfig: add 'catch-all' constant for RegisterPressure. diff -r 6daa0fd4af52 -r c6545476bc77 graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/alloc/RegisterAllocationConfig.java --- a/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/alloc/RegisterAllocationConfig.java Mon Apr 13 16:53:47 2015 +0200 +++ b/graal/com.oracle.graal.compiler.common/src/com/oracle/graal/compiler/common/alloc/RegisterAllocationConfig.java Mon Apr 13 17:00:21 2015 +0200 @@ -36,6 +36,8 @@ */ public class RegisterAllocationConfig { + public static final String ALL_REGISTERS = ""; + private static Register findRegister(String name, Register[] all) { for (Register reg : all) { if (reg.name.equals(name)) { @@ -46,7 +48,7 @@ } private static Register[] initAllocatable(Register[] registers) { - if (RegisterPressure.getValue() != null) { + if (RegisterPressure.getValue() != null && !RegisterPressure.getValue().equals(ALL_REGISTERS)) { String[] names = RegisterPressure.getValue().split(","); Register[] regs = new Register[names.length]; for (int i = 0; i < names.length; i++) { diff -r 6daa0fd4af52 -r c6545476bc77 graal/com.oracle.graal.lir/src/com/oracle/graal/lir/alloc/lsra/LinearScanPhase.java --- a/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/alloc/lsra/LinearScanPhase.java Mon Apr 13 16:53:47 2015 +0200 +++ b/graal/com.oracle.graal.lir/src/com/oracle/graal/lir/alloc/lsra/LinearScanPhase.java Mon Apr 13 17:00:21 2015 +0200 @@ -43,7 +43,7 @@ new LinearScan(target, lirGenRes, spillMoveFactory, new RegisterAllocationConfig(lirGenRes.getFrameMapBuilder().getRegisterConfig())).allocate(); } catch (OutOfRegistersException e) { if (RegisterPressure.getValue() != null) { - try (OverrideScope s = OptionValue.override(RegisterPressure, null)) { + try (OverrideScope s = OptionValue.override(RegisterPressure, RegisterAllocationConfig.ALL_REGISTERS)) { // retry with default register set new LinearScan(target, lirGenRes, spillMoveFactory, new RegisterAllocationConfig(lirGenRes.getFrameMapBuilder().getRegisterConfig())).allocate(); }