bug fix on the loop termination analysis
[IRC.git] / Robust / src / IR / Flat / BuildFlat.java
index fb3b75d1d7cf8126054e4d920189ba538ec096ef..c506e7ada8f3d1b1139f1431c0ef53005dde145c 100644 (file)
@@ -1355,6 +1355,7 @@ public class BuildFlat {
       fcb.setNumLine(ln.getNumLine());
       fcb.setTrueProb(State.TRUEPROB);
       fcb.setLoop();
+      fcb.setLoopEntrance(condition.getBegin());
       FlatNop nopend=new FlatNop();
       FlatBackEdge backedge=new FlatBackEdge();
 
@@ -1393,6 +1394,7 @@ public class BuildFlat {
       fcb.setNumLine(ln.getNumLine());
       fcb.setTrueProb(State.TRUEPROB);
       fcb.setLoop();
+      fcb.setLoopEntrance(begin);
       FlatNop nopend=new FlatNop();
       FlatBackEdge backedge=new FlatBackEdge();
 
@@ -1418,7 +1420,7 @@ public class BuildFlat {
       continueset=oldcs;
       if(ln.getLabel()!=null){
         state.fn2labelMap.put(begin, ln.getLabel());
-      }
+      }      
       return new NodePair(begin,nopend);
     } else if (ln.getType()==LoopNode.DOWHILELOOP) {
       TempDescriptor cond_temp=TempDescriptor.tempFactory("condition", new TypeDescriptor(TypeDescriptor.BOOLEAN));
@@ -1429,6 +1431,7 @@ public class BuildFlat {
       fcb.setNumLine(ln.getNumLine());
       fcb.setTrueProb(State.TRUEPROB);
       fcb.setLoop();
+      fcb.setLoopEntrance(begin);
       FlatNop nopend=new FlatNop();
       FlatBackEdge backedge=new FlatBackEdge();