comparison graal/com.oracle.graal.lir/src/com/oracle/graal/lir/alloc/lsra/LinearScanWalker.java @ 20993:ec36daea3cf0

When OutOfRegisters, give a hint in the exceptions description, which kind of register is running out
author Stefan Anzinger <stefan.anzinger@oracle.com>
date Thu, 16 Apr 2015 17:01:53 +0200
parents 2b10bb41a298
children 68ff637e95b1
comparison
equal deleted inserted replaced
20992:0a4bbeae6e31 20993:ec36daea3cf0
712 if (regUsePos <= firstUsage) { 712 if (regUsePos <= firstUsage) {
713 Debug.log("able to spill current interval. firstUsage(register): %d, usePos: %d", firstUsage, regUsePos); 713 Debug.log("able to spill current interval. firstUsage(register): %d, usePos: %d", firstUsage, regUsePos);
714 714
715 if (firstUsage <= interval.from() + 1) { 715 if (firstUsage <= interval.from() + 1) {
716 String description = "cannot spill interval that is used in first instruction (possible reason: no register found) firstUsage=" + firstUsage + ", interval.from()=" + 716 String description = "cannot spill interval that is used in first instruction (possible reason: no register found) firstUsage=" + firstUsage + ", interval.from()=" +
717 interval.from(); 717 interval.from() + "; already used candidates: " + Arrays.toString(availableRegs);
718 // assign a reasonable register and do a bailout in product mode to avoid errors 718 // assign a reasonable register and do a bailout in product mode to avoid errors
719 allocator.assignSpillSlot(interval); 719 allocator.assignSpillSlot(interval);
720 allocator.printIntervals(description); 720 allocator.printIntervals(description);
721 throw new OutOfRegistersException("LinearScan: no register found", description); 721 throw new OutOfRegistersException("LinearScan: no register found", description);
722 } 722 }