From 1f6cfc1249790883f2a66733af40213a3d16e3b9 Mon Sep 17 00:00:00 2001 From: bdemsky Date: Wed, 26 Mar 2008 02:36:36 +0000 Subject: [PATCH] bugs --- Robust/src/Analysis/Prefetch/LoopExit.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Robust/src/Analysis/Prefetch/LoopExit.java b/Robust/src/Analysis/Prefetch/LoopExit.java index d116741d..7876a2c3 100644 --- a/Robust/src/Analysis/Prefetch/LoopExit.java +++ b/Robust/src/Analysis/Prefetch/LoopExit.java @@ -40,6 +40,7 @@ public class LoopExit { while(!nodeset.isEmpty()) { FlatNode fn=nodeset.iterator().next(); + nodeset.remove(fn); if (fn.kind()==FKind.FlatCondBranch&&((FlatCondBranch)fn).isLoopBranch()) { FlatCondBranch fcb=(FlatCondBranch)fn; loopbranchset.add(fcb); @@ -49,7 +50,8 @@ public class LoopExit { propagateset(nodeset, table, fcb, fcb.getNext(1), null); loopbranchset.add(fcb); } else if (fn.kind()==FKind.FlatReturnNode) { - exitset.addAll(table.get(fn)); + if (table.containsKey(fn)) + exitset.addAll(table.get(fn)); } else { for(int i=0;i