Mercurial > hg > graal-compiler
changeset 11864:fbcde297f87a
NewMemoryAwareScheudling: process loop a second time in order to compute the loop exists correctly with the new merged state
author | Bernhard Urban <bernhard.urban@jku.at> |
---|---|
date | Wed, 02 Oct 2013 11:16:21 +0200 |
parents | 7763a42d1658 |
children | 3d97040060d4 |
files | graal/com.oracle.graal.phases/src/com/oracle/graal/phases/schedule/SchedulePhase.java |
diffstat | 1 files changed, 3 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/schedule/SchedulePhase.java Wed Oct 02 13:32:30 2013 +0200 +++ b/graal/com.oracle.graal.phases/src/com/oracle/graal/phases/schedule/SchedulePhase.java Wed Oct 02 11:16:21 2013 +0200 @@ -250,18 +250,16 @@ @Override protected List<Map<LocationIdentity, Node>> processLoop(Loop loop, Map<LocationIdentity, Node> state) { - LoopInfo<Map<LocationIdentity, Node>> info = ReentrantBlockIterator.processLoop(this, loop, new HashMap<>(state)); + LoopInfo<Map<LocationIdentity, Node>> info = ReentrantBlockIterator.processLoop(this, loop, cloneState(state)); assert loop.header.getBeginNode() instanceof LoopBeginNode; Map<LocationIdentity, Node> headerState = merge(loop.header, info.endStates); - // getBlockToKillMap().put(loop.header, headerState); + // second iteration, for computing information at loop exits + info = ReentrantBlockIterator.processLoop(this, loop, cloneState(headerState)); int i = 0; for (Block exit : loop.exits) { Map<LocationIdentity, Node> exitState = info.exitStates.get(i++); - for (LocationIdentity key : headerState.keySet()) { - exitState.put(key, headerState.get(key)); - } Node begin = exit.getBeginNode(); assert begin instanceof LoopExitNode;