From: bdemsky Date: Wed, 24 Jun 2009 09:44:31 +0000 (+0000) Subject: bug fix X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a826ce57ee53e9783ad7e64629d25f968eeb6c1a;p=IRC.git bug fix --- diff --git a/Robust/src/Analysis/Loops/CopyPropagation.java b/Robust/src/Analysis/Loops/CopyPropagation.java index 9d211cf9..3fd27ef7 100644 --- a/Robust/src/Analysis/Loops/CopyPropagation.java +++ b/Robust/src/Analysis/Loops/CopyPropagation.java @@ -33,15 +33,18 @@ public class CopyPropagation { HashSet toremove=new HashSet(); for(int i=1;i tp=table.get(fn.getPrev(i)); - for(Iterator tmpit=tab.entrySet().iterator();tmpit.hasNext();) { + for(Iterator tmpit=tp.entrySet().iterator();tmpit.hasNext();) { Map.Entry t=(Map.Entry)tmpit.next(); TempDescriptor tmp=(TempDescriptor)t.getKey(); - if (tp!=null&&tp.containsKey(tmp)&&tp.get(tmp)!=tab.get(tmp)) { - toremove.add(tmp); + + if (!tab.containsKey(tmp)) + tab.put(tmp, tp.get(tmp)); + else if (tab.get(tmp)!=tp.get(tmp)) { + tab.put(tmp, bogustd); } } } - + TempDescriptor[]writes=fn.writesTemps(); for(int i=0;i