Mercurial > hg > truffle
changeset 18701:28e46ea20c93
[SPARC] Attempt to fix the NullPointerException problem
author | Stefan Anzinger <stefan.anzinger@oracle.com> |
---|---|
date | Tue, 16 Dec 2014 23:36:29 +0100 |
parents | a4fbcdce06c8 |
children | d854f8a5256f |
files | graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotBackend.java |
diffstat | 1 files changed, 7 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotBackend.java Mon Dec 15 19:32:12 2014 +0100 +++ b/graal/com.oracle.graal.hotspot.sparc/src/com/oracle/graal/hotspot/sparc/SPARCHotSpotBackend.java Tue Dec 16 23:36:29 2014 +0100 @@ -313,8 +313,7 @@ for (int i = instructions.size() - 1; i >= 0; i--) { LIRInstruction inst = instructions.get(i); boolean adjacent = delayTransferPosition - i == 1; - - if ((!adjacent && inst.hasState()) || inst.destroysCallerSavedRegisters() || leavesRegisterWindow(inst)) { + if (!adjacent || inst.destroysCallerSavedRegisters() || leavesRegisterWindow(inst)) { delayedTransfer = null; } if (inst instanceof SPARCDelayedControlTransfer) { @@ -327,11 +326,12 @@ // We have found a non overlapping LIR instruction which can be delayed ((SPARCTailDelayedLIRInstruction) inst).setDelayedControlTransfer(delayedTransfer); delayedTransfer = null; - if (!adjacent) { - // If not adjacent, we make it adjacent - instructions.remove(i); - instructions.add(delayTransferPosition - 1, inst); - } + // Removed the moving as it causes problems (Nullpointer exceptions) + // if (!adjacent) { + // // If not adjacent, we make it adjacent + // instructions.remove(i); + // instructions.add(delayTransferPosition - 1, inst); + // } } } }