+ /** This method returns a hashtable for a given LocalityBinding
+ * that tells the current local/global status of temps at the
+ * beginning of each node in the flat representation. */
+
+ public Hashtable<TempDescriptor, Integer> getNodePreTempInfo(LocalityBinding lb, FlatNode fn) {
+ Hashtable<TempDescriptor, Integer> currtable=new Hashtable<TempDescriptor, Integer>();
+ Hashtable<FlatNode, Hashtable<TempDescriptor, Integer>> temptable=getNodeTempInfo(lb);
+
+ for(int i=0;i<fn.numPrev();i++) {
+ FlatNode prevnode=fn.getPrev(i);
+ Hashtable<TempDescriptor, Integer> prevtable=temptable.get(prevnode);
+ for(Iterator<TempDescriptor> tempit=prevtable.keySet().iterator();tempit.hasNext();) {
+ TempDescriptor temp=tempit.next();
+ Integer tmpint=prevtable.get(temp);
+ Integer oldint=currtable.containsKey(temp)?currtable.get(temp):EITHER;
+ Integer newint=merge(tmpint, oldint);
+ currtable.put(temp, newint);
+ }
+ }
+ return currtable;
+ }
+