allow turning off this analysisi
authorbdemsky <bdemsky>
Mon, 29 Jun 2009 10:30:31 +0000 (10:30 +0000)
committerbdemsky <bdemsky>
Mon, 29 Jun 2009 10:30:31 +0000 (10:30 +0000)
Robust/src/Analysis/Loops/WriteBarrier.java

index 7a933bfff482d05e1adaa59beb1613d5454b3026..16a6d79deba9799c5c2c518a4c85476f98bcaa73 100644 (file)
@@ -12,12 +12,25 @@ public class WriteBarrier {
   /* This computes whether we actually need a write barrier. */
   LocalityAnalysis la;
   State state;
+  boolean turnoff;
+
   public WriteBarrier(LocalityAnalysis la, State state) {
     this.la=la;
     this.state=state;
+    turnoff=false;
+  }
+
+  public void turnoff() {
+    turnoff=true;
+  }
+
+  public void turnon() {
+    turnoff=false;
   }
   
   public boolean needBarrier(FlatNode fn) {
+    if (turnoff)
+      return false;
     HashSet<TempDescriptor> nb=computeIntersection(fn);
     switch(fn.kind()) {
     case FKind.FlatSetElementNode: