modified compiler files for adding new keyword "getoffset" and adding
[IRC.git] / Robust / src / Analysis / Locality / LocalityAnalysis.java
index a7e645f5648785ab397828eb84163f4157aa7943..289f7e888622a6a9f21f8b3dcfc0bf75ca882bb6 100644 (file)
@@ -357,6 +357,12 @@ public class LocalityAnalysis {
        throw new Error("Incompatible with tasks!");
 
       case FKind.FlatMethod:
+
+      case FKind.FlatOffsetNode:
+       //System.out.println("In FKind.FlatOffsetNode\n");
+       processOffsetNode((FlatOffsetNode)fn, currtable);
+       break;
+
       default:
        throw new Error();
       }
@@ -432,8 +438,9 @@ public class LocalityAnalysis {
        for(int i=0; i<fc.numArgs(); i++) {
          TempDescriptor arg=fc.getArg(i);
          if(isnative&&(currtable.get(arg).equals(GLOBAL)||
-                       currtable.get(arg).equals(CONFLICT)))
+                       currtable.get(arg).equals(CONFLICT))&& !(nodemd.getSymbol().equals("rangePrefetch"))) {
            throw new Error("Potential call to native method "+md+" with global parameter:\n"+currlb.getExplanation());
+         }
          lb.setGlobal(i,currtable.get(arg));
        }
       }
@@ -566,6 +573,11 @@ public class LocalityAnalysis {
     currtable.put(fon.getDest(), srcvalue);
   }
 
+  void processOffsetNode(FlatOffsetNode fon, Hashtable<TempDescriptor, Integer> currtable) {
+    /* Just propagate value */
+    currtable.put(fon.getDst(), LOCAL);
+  }
+
   void processCastNode(FlatCastNode fcn, Hashtable<TempDescriptor, Integer> currtable) {
     currtable.put(fcn.getDst(), currtable.get(fcn.getSrc()));
   }