optimize some analysis so they run faster...benchmarks were taking too long to compil...
[IRC.git] / Robust / src / Analysis / Locality / DelayComputation.java
index dd8defa0f681093b28d1bfdcbea3046d84588c6c..e6c45bd442703ed249af994d806a3c7d46919c23 100644 (file)
@@ -394,6 +394,7 @@ public class DelayComputation {
        continue;
       }
 
+      Set<TempDescriptor> liveset=livemap.get(fn);
       //Do merge on incoming edges
       for(int i=0;i<fn.numPrev();i++) {
        FlatNode fnprev=fn.getPrev(i);
@@ -401,6 +402,8 @@ public class DelayComputation {
        if (prevmap!=null)
          for(Iterator<TempDescriptor> tmpit=prevmap.keySet().iterator();tmpit.hasNext();) {
            TempDescriptor tmp=tmpit.next();
+           if (!liveset.contains(tmp)) //skip dead temps
+             continue;
            if (!tmptofn.containsKey(tmp))
              tmptofn.put(tmp, new HashSet<FlatNode>());
            tmptofn.get(tmp).addAll(prevmap.get(tmp));