Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Diff of /Backend/If1opt/if1normal.c [32eb06] .. [28e18d] Maximize Restore

  Switch to side-by-side view

--- a/Backend/If1opt/if1normal.c
+++ b/Backend/If1opt/if1normal.c
@@ -1,10 +1,20 @@
-/* if1normal.c,v
+/**************************************************************************/
+/* FILE   **************        if1normal.c        ************************/
+/**************************************************************************/
+/* Author: Dave Cann                                                      */
+/* Update: Patrick Miller -- Ansi support (Dec 2000)                      */
+/* Copyright (C) University of California Regents                         */
+/**************************************************************************/
+/*
+ * $Log:
+ *
  * Revision 12.7  1992/11/04  22:04:58  miller
  * Initial revision
  *
  * Revision 12.7  1992/10/21  18:08:35  miller
  * Initial RCS Version by Cann
- * */
+ */
+/**************************************************************************/
 
 #include "world.h"
 
@@ -80,32 +90,32 @@
 
 
     for ( n = g->G_NODES; n != NULL; n = n->nsucc ) {
-	if ( IsCompound( n ) )
-	    for ( sg = n->C_SUBS; sg != NULL; sg = sg->gsucc )
-		SimplifyGenerates( sg );
-
-	if ( !IsForall( n ) ) continue;
-
-	/* THEY ALL MUST BE RangeGenerate NODES!!! */
-	for ( rg1 = n->F_GEN->G_NODES; rg1 != NULL; rg1 = rg1->nsucc )
-	    if ( rg1->type != IFRangeGenerate )
-		break;
-
-	if ( rg1 != NULL )
-	  continue;
-
-	rg1 = n->F_GEN->imp->src; /* CONTROL ROD */
-
-	/* REMOVE ALL BUT THE CONTROL ROD */
-
-	for ( rg2 = n->F_GEN->G_NODES; rg2 != NULL; rg2 = sn ) {
-	    sn = rg2->nsucc;
-	    if ( rg2 == rg1 ) continue; /* SKIP THE CONTROL ROD */
+        if ( IsCompound( n ) )
+            for ( sg = n->C_SUBS; sg != NULL; sg = sg->gsucc )
+                SimplifyGenerates( sg );
+
+        if ( !IsForall( n ) ) continue;
+
+        /* THEY ALL MUST BE RangeGenerate NODES!!! */
+        for ( rg1 = n->F_GEN->G_NODES; rg1 != NULL; rg1 = rg1->nsucc )
+            if ( rg1->type != IFRangeGenerate )
+                break;
+
+        if ( rg1 != NULL )
+          continue;
+
+        rg1 = n->F_GEN->imp->src; /* CONTROL ROD */
+
+        /* REMOVE ALL BUT THE CONTROL ROD */
+
+        for ( rg2 = n->F_GEN->G_NODES; rg2 != NULL; rg2 = sn ) {
+            sn = rg2->nsucc;
+            if ( rg2 == rg1 ) continue; /* SKIP THE CONTROL ROD */
 
             minus = NodeAlloc( ++maxint, IFMinus );
-	    CopyVitals( rg2, minus );
+            CopyVitals( rg2, minus );
             neg   = NodeAlloc( ++maxint, IFNeg );
-	    CopyVitals( rg2, neg );
+            CopyVitals( rg2, neg );
 
             LinkNode( n->npred, minus );
             LinkNode( minus, neg );
@@ -121,49 +131,49 @@
             LinkImport( neg, e );
 
             if ( IsConst( rg1->imp ) ) {
-	        e = CopyEdge( rg1->imp, NULL_NODE, minus );
+                e = CopyEdge( rg1->imp, NULL_NODE, minus );
                 e->iport = 1;
             } else {
                 e = CopyEdge((x=FindImport(n,rg1->imp->eport)),NULL_NODE,minus);
-	        e->iport = 1;
+                e->iport = 1;
         
-	        if ( !IsConst( x ) ) {
-	            e->src = x->src;
+                if ( !IsConst( x ) ) {
+                    e->src = x->src;
                     LinkExport( x->src, e );
-	            }
-	        }
+                    }
+                }
 
             LinkImport( minus, e );
         
             if ( IsConst( rg2->imp ) ) {
-	        e = CopyEdge( rg2->imp, NULL_NODE, minus );
+                e = CopyEdge( rg2->imp, NULL_NODE, minus );
                 e->iport = 2;
             } else {
                 e = CopyEdge((x=FindImport(n,rg2->imp->eport)),NULL_NODE,minus);
-	        e->iport = 2;
+                e->iport = 2;
         
-	        if ( !IsConst( x ) ) {
-	            e->src = x->src;
+                if ( !IsConst( x ) ) {
+                    e->src = x->src;
                     LinkExport( x->src, e );
-	            }
-	        }
+                    }
+                }
 
             LinkImport( minus, e );
 
             plus = NodeAlloc( ++maxint, IFPlus );
-	    CopyVitals( minus, plus );
-	    LinkNode( n->F_BODY, plus );
+            CopyVitals( minus, plus );
+            LinkNode( n->F_BODY, plus );
 
             e = CopyEdge( rg1->exp, n->F_BODY, plus );
-	    e->info  = rg1->imp->info;
-	    e->eport = rg1->exp->iport;
-	    e->iport = 1;
+            e->info  = rg1->imp->info;
+            e->eport = rg1->exp->iport;
+            e->iport = 1;
             LinkExport( n->F_BODY, e );
             LinkImport( plus, e );
 
             e = CopyEdge( T, n->F_BODY, plus );
-	    e->iport = 2;
-	    e->eport = t;
+            e->iport = 2;
+            e->eport = t;
             LinkExport( n->F_BODY, e );
             LinkImport( plus, e );
 
@@ -172,27 +182,27 @@
             LinkExport( plus, e );
             LinkImport( n->F_BODY, e );
 
-	    for ( e = n->F_BODY->exp; e != NULL; e = se ) {
-		se = e->esucc;
-		if ( e->eport == rg2->exp->iport ) {
-		    UnlinkExport( e );
-		    e->eport = 1;
-		    LinkExport( plus, e );
-		    }
+            for ( e = n->F_BODY->exp; e != NULL; e = se ) {
+                se = e->esucc;
+                if ( e->eport == rg2->exp->iport ) {
+                    UnlinkExport( e );
+                    e->eport = 1;
+                    LinkExport( plus, e );
+                    }
                 }
 
-	    for ( e = n->F_RET->exp; e != NULL; e = e->esucc )
-		if ( e->eport == rg2->exp->iport )
-		    e->eport = t;
-
-	    UnlinkNode( rg2 );
-	    UnlinkImport( rg2->exp );
-
-	    if ( rg2->imp->isucc != NULL )
-	        UnlinkExport( rg2->imp->isucc );
-
-	    UnlinkExport( rg2->imp );
-	    rgcnt++;
+            for ( e = n->F_RET->exp; e != NULL; e = e->esucc )
+                if ( e->eport == rg2->exp->iport )
+                    e->eport = t;
+
+            UnlinkNode( rg2 );
+            UnlinkImport( rg2->exp );
+
+            if ( rg2->imp->isucc != NULL )
+                UnlinkExport( rg2->imp->isucc );
+
+            UnlinkExport( rg2->imp );
+            rgcnt++;
             }
 
        /* NORMALIZE CONTROL ROD LOGICALS IN BODY: MAY REMOVE A SUCCESSOR OF n */
@@ -204,98 +214,98 @@
        hi = lo->isucc;
 
        for ( e = n->F_BODY->exp; e != NULL; e = e->esucc ) {
-	 /* IS e A REFERENCE TO THE CONTROL ROD */
-	 if ( e->eport != c->iport )
-	   continue;
-
-	 switch ( e->dst->type ) {
-	   case IFEqual:
-	     if ( e->iport != 1 )
-	       ImportSwap( e->dst );
-
-	     break;
-
-	   case IFLess:
-	     /* CONTROL < HI */
-
-	     /* IS THE CONTROL ROD THE FIRST IMPORT */
-	     if ( e->iport != 1 )
-	       goto MoveOn1;
-
-	     /* IS THE SECOND IMPORT A REFERENCE TO HI */
-	     if ( !AreValuesEqual( e->dst->imp->isucc, hi ) )
-	       break;
-
-	     e->dst->type = IFNotEqual;
-	     nlog++;
-	     break;
+         /* IS e A REFERENCE TO THE CONTROL ROD */
+         if ( e->eport != c->iport )
+           continue;
+
+         switch ( e->dst->type ) {
+           case IFEqual:
+             if ( e->iport != 1 )
+               ImportSwap( e->dst );
+
+             break;
+
+           case IFLess:
+             /* CONTROL < HI */
+
+             /* IS THE CONTROL ROD THE FIRST IMPORT */
+             if ( e->iport != 1 )
+               goto MoveOn1;
+
+             /* IS THE SECOND IMPORT A REFERENCE TO HI */
+             if ( !AreValuesEqual( e->dst->imp->isucc, hi ) )
+               break;
+
+             e->dst->type = IFNotEqual;
+             nlog++;
+             break;
 
 MoveOn1:
-	     /* LO < CONTROL */
-
-	     /* IS THE FIRST IMPORT A REFERENCE TO LO */
-	     if ( !AreValuesEqual( e->dst->imp, lo ) )
-	       break;
-
-	     e->dst->type = IFNotEqual;
-	     ImportSwap( e->dst );
-	     nlog++;
-	     break;
-
-	   case IFLessEqual:
-	     if ( e->dst->exp->esucc != NULL )
-	       break;
-
-	     not = e->dst->exp->dst;
-
-	     if ( !IsNot( not ) )
-	       break;
-
-	     /* NOT( CONTROL <= LO ) FOR CONTROL > LO */
-
-	     /* IS THE CONTROL ROD THE FIRST IMPORT */
-	     if ( e->iport != 1 )
-	       goto MoveOn2;
-
-	     /* IS THE SECOND IMPORT A REFERENCE TO LO */
-	     if ( !AreValuesEqual( e->isucc, lo ) )
-	       break;
-
-	     e->dst->type = IFNotEqual;
-
-	     LinkExportLists( e->dst, not );
-
-	     UnlinkExport( not->imp );
-	     UnlinkNode( not );
-	     /* free( not->imp ); */
-	     /* free( not ); */
-	     nlog++;
-	     break;
+             /* LO < CONTROL */
+
+             /* IS THE FIRST IMPORT A REFERENCE TO LO */
+             if ( !AreValuesEqual( e->dst->imp, lo ) )
+               break;
+
+             e->dst->type = IFNotEqual;
+             ImportSwap( e->dst );
+             nlog++;
+             break;
+
+           case IFLessEqual:
+             if ( e->dst->exp->esucc != NULL )
+               break;
+
+             not = e->dst->exp->dst;
+
+             if ( !IsNot( not ) )
+               break;
+
+             /* NOT( CONTROL <= LO ) FOR CONTROL > LO */
+
+             /* IS THE CONTROL ROD THE FIRST IMPORT */
+             if ( e->iport != 1 )
+               goto MoveOn2;
+
+             /* IS THE SECOND IMPORT A REFERENCE TO LO */
+             if ( !AreValuesEqual( e->isucc, lo ) )
+               break;
+
+             e->dst->type = IFNotEqual;
+
+             LinkExportLists( e->dst, not );
+
+             UnlinkExport( not->imp );
+             UnlinkNode( not );
+             /* free( not->imp ); */
+             /* free( not ); */
+             nlog++;
+             break;
 
 MoveOn2:
-	     /* NOT( HI <= CONTROL ) FOR HI > CONTORL */
-
-	     /* IS THE SECOND IMPORT A REFERENCE TO HI */
-	     if ( !AreValuesEqual( e->dst->imp, hi ) )
-	       break;
-
-	     e->dst->type = IFNotEqual;
-
-	     ImportSwap( e->dst );
-
-	     LinkExportLists( e->dst, not );
-
-	     UnlinkExport( not->imp );
-	     UnlinkNode( not );
-	     /* free( not->imp ); */
-	     /* free( not ); */
-	     nlog++;
-	     break;
-
-	   default:
-	     break;
-	   }
-	 }
+             /* NOT( HI <= CONTROL ) FOR HI > CONTORL */
+
+             /* IS THE SECOND IMPORT A REFERENCE TO HI */
+             if ( !AreValuesEqual( e->dst->imp, hi ) )
+               break;
+
+             e->dst->type = IFNotEqual;
+
+             ImportSwap( e->dst );
+
+             LinkExportLists( e->dst, not );
+
+             UnlinkExport( not->imp );
+             UnlinkNode( not );
+             /* free( not->imp ); */
+             /* free( not ); */
+             nlog++;
+             break;
+
+           default:
+             break;
+           }
+         }
 
        }
 }
@@ -330,8 +340,8 @@
   switch ( from->type ) {
     case IF_RECORD:
       for ( r = from->R_FIRST; r != NULL; r = r->L_NEXT )
-	if ( IsRecursive( r->L_SUB, ato ) )
-	  return( TRUE );
+        if ( IsRecursive( r->L_SUB, ato ) )
+          return( TRUE );
 
       break;
 
@@ -397,11 +407,11 @@
   for ( n = g->G_NODES; n != NULL; n = n->nsucc ) {
     if ( IsCompound( n ) )
       for ( sg = n->C_SUBS; sg != NULL; sg = sg->gsucc )
-	MarkReferencedFunctions( f, sg );
+        MarkReferencedFunctions( f, sg );
 
     if ( IsCall( n ) ) {
       if ( (ff = FindFunctionGraph( f, n->imp->CoNsT )) == NULL )
-	continue;
+        continue;
 
       ff->print = TRUE;
       }
@@ -416,7 +426,7 @@
 
   for ( f = glstop->gsucc; f != NULL; f = f->gsucc ) {
     if ( f->mark == 'e' || f->mark == 's' || 
-	 f->mark == 'c' || f->mark == 'f' ||
+         f->mark == 'c' || f->mark == 'f' ||
          f->mark == 'd' )  /* ENTRY POINTS? */
       f->print = TRUE;
 
@@ -534,29 +544,29 @@
     register PNODE nn;
 
     for ( i = n->imp; i != NULL; i = i->isucc ) {
-	if ( !IsConst( i ) )
-	  continue;
-
-	if ( i->CoNsT == NULL ) { /* ERROR CONSTANT */
-	  nn = NodeAlloc( ++maxint, IFError );
-	  CopyVitals( n, nn );
-	  i->eport = 1;
-	  LinkExport( nn, i );
-	  LinkNode( (IsGraph(n))? n : n->npred, nn );
-	  eccnt++;
-	  continue;
-	  }
-
-	if ( IsBoolean( i->info ) ) {
-	  /* CANN: BUG FIX 2/1/90 is neg(y) compilation */
-	  /* if ( i->CoNsT == NULL ) i->CoNsT = "FALSE"; */
-
-	  if ( (i->CoNsT[0] == 'T') || (i->CoNsT[0] == 't') )
-	    i->CoNsT = "TRUE";
+        if ( !IsConst( i ) )
+          continue;
+
+        if ( i->CoNsT == NULL ) { /* ERROR CONSTANT */
+          nn = NodeAlloc( ++maxint, IFError );
+          CopyVitals( n, nn );
+          i->eport = 1;
+          LinkExport( nn, i );
+          LinkNode( (IsGraph(n))? n : n->npred, nn );
+          eccnt++;
+          continue;
+          }
+
+        if ( IsBoolean( i->info ) ) {
+          /* CANN: BUG FIX 2/1/90 is neg(y) compilation */
+          /* if ( i->CoNsT == NULL ) i->CoNsT = "FALSE"; */
+
+          if ( (i->CoNsT[0] == 'T') || (i->CoNsT[0] == 't') )
+            i->CoNsT = "TRUE";
           else
-	    i->CoNsT = "FALSE";
+            i->CoNsT = "FALSE";
           }
-	}
+        }
 }
 
 
@@ -575,24 +585,24 @@
     register PEDGE ii;
 
     if ( !native )
-	return;
+        return;
 
     if ( IsConst( s->S_TEST->imp ) )
-	return;
+        return;
 
     i = FindImport( s, s->S_TEST->imp->eport );
 
     if ( IsConst( i ) )
-	return;
+        return;
 
     if ( IsExport( s->S_ALT, i->iport ) || IsExport( s->S_CONS, i->iport ) )
-	return;
+        return;
 
     if ( UsageCount( i->src, i->eport ) > 1 )
-	return;
+        return;
 
     if ( !IsInt( i->src ) )
-	return;
+        return;
 
     ii = i->src->imp;
     ii->iport = i->iport;
@@ -662,146 +672,146 @@
         }
 
     if ( !native )
-	return;
+        return;
 
     /* CONVERT AScatter NODES (FOR ARRAYS) INTO RangeGenerate NODES       */
 
     for ( n = f->F_GEN->G_NODES; n != NULL; n = n->nsucc ) {
-	if ( !IsAScatter( n ) )
-	    continue;
+        if ( !IsAScatter( n ) )
+            continue;
 
         if ( IsStream( n->imp->info ) )
-	    continue;
-
-	srcnt++;
-	n->type = IFRangeGenerate;
-
-	a = FindImport( f, n->imp->eport );
-
-	/* INSERT AND WIRE THE ALimL NODE                                 */
-
-	nd = NodeAlloc( ++maxint, IFALimL );
-	CopyVitals( n, nd );
-	LinkNode( f->npred, nd );
-
-	e = EdgeAlloc( a->src, a->eport, nd, 1 ); /* e1 */
-	e->info = a->info;
-	LinkImport( nd, e );
-	LinkExport( a->src, e );
-
-	e = EdgeAlloc( nd, 1, f, ++maxint ); /* e2 */
-	e->info = integer;
-	LinkExport( nd, e );
-	LinkImport( f,  e );
-
-	n->imp->eport = maxint; /* e3 */
-	n->imp->info  = integer;
-
-	/* INSERT AND CORRESPONDINGLY WIRE THE ALimH NODE                 */
-
-	nd = NodeAlloc( ++maxint, IFALimH );
-	CopyVitals( n, nd );
-	LinkNode( f->npred, nd );
-
-	e = EdgeAlloc( a->src, a->eport, nd, 1 ); /* e1 */
-	e->info = a->info;
-	LinkImport( nd, e );
-	LinkExport( a->src, e );
-
-	e = EdgeAlloc( nd, 1, f, ++maxint ); /* e2 */
-	e->info = integer;
-	LinkExport( nd, e );
-	LinkImport( f,  e );
-
-	e = EdgeAlloc( f->F_GEN, maxint, n, 2 ); /* e3 */
-	e->info = integer;
-	LinkExport( f->F_GEN, e );
-	LinkImport( n, e );
-
-	/* REMOVE SCATTERED VALUE EDGE FROM NEW RangeGenerate NODE AND    */
-	/* CHANGE EXPORT PORT NUMBER OF REMAINING EDGE TO ONE             */
-
-	UnlinkExport( v = FindExport( n, 1 ) );
-	UnlinkImport( v );
-
-	n->exp->eport = 1;
-
-	/* INSERT AElement IN BODY IF SCATTERED VALUE REFERENCE IN BODY   */
-	/* OR RETURN SUBGRAPH                                             */
-	   
+            continue;
+
+        srcnt++;
+        n->type = IFRangeGenerate;
+
+        a = FindImport( f, n->imp->eport );
+
+        /* INSERT AND WIRE THE ALimL NODE                                 */
+
+        nd = NodeAlloc( ++maxint, IFALimL );
+        CopyVitals( n, nd );
+        LinkNode( f->npred, nd );
+
+        e = EdgeAlloc( a->src, a->eport, nd, 1 ); /* e1 */
+        e->info = a->info;
+        LinkImport( nd, e );
+        LinkExport( a->src, e );
+
+        e = EdgeAlloc( nd, 1, f, ++maxint ); /* e2 */
+        e->info = integer;
+        LinkExport( nd, e );
+        LinkImport( f,  e );
+
+        n->imp->eport = maxint; /* e3 */
+        n->imp->info  = integer;
+
+        /* INSERT AND CORRESPONDINGLY WIRE THE ALimH NODE                 */
+
+        nd = NodeAlloc( ++maxint, IFALimH );
+        CopyVitals( n, nd );
+        LinkNode( f->npred, nd );
+
+        e = EdgeAlloc( a->src, a->eport, nd, 1 ); /* e1 */
+        e->info = a->info;
+        LinkImport( nd, e );
+        LinkExport( a->src, e );
+
+        e = EdgeAlloc( nd, 1, f, ++maxint ); /* e2 */
+        e->info = integer;
+        LinkExport( nd, e );
+        LinkImport( f,  e );
+
+        e = EdgeAlloc( f->F_GEN, maxint, n, 2 ); /* e3 */
+        e->info = integer;
+        LinkExport( f->F_GEN, e );
+        LinkImport( n, e );
+
+        /* REMOVE SCATTERED VALUE EDGE FROM NEW RangeGenerate NODE AND    */
+        /* CHANGE EXPORT PORT NUMBER OF REMAINING EDGE TO ONE             */
+
+        UnlinkExport( v = FindExport( n, 1 ) );
+        UnlinkImport( v );
+
+        n->exp->eport = 1;
+
+        /* INSERT AElement IN BODY IF SCATTERED VALUE REFERENCE IN BODY   */
+        /* OR RETURN SUBGRAPH                                             */
+           
         if ( IsExport( f->F_RET, v->iport ) || 
-	     IsExport( f->F_BODY, v->iport ) ) {
+             IsExport( f->F_BODY, v->iport ) ) {
             nd = NodeAlloc( ++maxint, IFAElement );
-	    CopyVitals( n, nd );
-	    LinkNode( f->F_BODY, nd );
-
-	    e = EdgeAlloc( f->F_BODY, a->iport, nd, 1 ); /* A */
-	    e->info = a->info;
-	    LinkExport( f->F_BODY, e );
-	    LinkImport( nd, e );
-
-	    e = EdgeAlloc( f->F_BODY, n->exp->iport, nd, 2 ); /* INDEX */
-	    e->info = integer;
-	    LinkExport( f->F_BODY, e );
-	    LinkImport( nd, e );
-
-	    /* LINK v REFERENCES IN BODY SUBGRAPH TO THE AElement NODE    */
+            CopyVitals( n, nd );
+            LinkNode( f->F_BODY, nd );
+
+            e = EdgeAlloc( f->F_BODY, a->iport, nd, 1 ); /* A */
+            e->info = a->info;
+            LinkExport( f->F_BODY, e );
+            LinkImport( nd, e );
+
+            e = EdgeAlloc( f->F_BODY, n->exp->iport, nd, 2 ); /* INDEX */
+            e->info = integer;
+            LinkExport( f->F_BODY, e );
+            LinkImport( nd, e );
+
+            /* LINK v REFERENCES IN BODY SUBGRAPH TO THE AElement NODE    */
 
             for ( e = f->F_BODY->exp; e != NULL; e = se ) {
-		se = e->esucc;
-
-		if ( e->eport != v->iport )
-		    continue;
+                se = e->esucc;
+
+                if ( e->eport != v->iport )
+                    continue;
 
                 UnlinkExport( e );
-		e->eport = 1;
-		LinkExport( nd, e );
-		}
-
-	    /* WIRE AElement OUTPUT TO RETURN SUBGRAPH REFERENCES         */
-
-	    if ( IsExport( f->F_RET, v->iport ) ) {
-		e = EdgeAlloc( nd, 1, f->F_BODY, ++maxint );
-
-		e->info = v->info->A_ELEM;       /* IT IS A MULTIPLE TYPE */
-
-		LinkExport( nd, e );
-		LinkImport( f->F_BODY, e );
-
-		ChangeExportPorts( f->F_RET, v->iport, maxint );
-		}
-
-	    }
-
-	/* free( v ); */
-	}
+                e->eport = 1;
+                LinkExport( nd, e );
+                }
+
+            /* WIRE AElement OUTPUT TO RETURN SUBGRAPH REFERENCES         */
+
+            if ( IsExport( f->F_RET, v->iport ) ) {
+                e = EdgeAlloc( nd, 1, f->F_BODY, ++maxint );
+
+                e->info = v->info->A_ELEM;       /* IT IS A MULTIPLE TYPE */
+
+                LinkExport( nd, e );
+                LinkImport( f->F_BODY, e );
+
+                ChangeExportPorts( f->F_RET, v->iport, maxint );
+                }
+
+            }
+
+        /* free( v ); */
+        }
 
     /* REMOVE THE SECOND INPUT FROM ALL NON-CONTROL RangeGenerate NODES   */
     /* AND THE INDEX OUTPUT FROM ALL AScatter NODES IF THEY ARE NOT USED  */
 
     for ( n = f->F_GEN->G_NODES; n != NULL; n = n->nsucc ) {
-	switch ( n->type ) {
-	    case IFRangeGenerate:
-		if ( n->exp != n->exp->dst->imp ) {
-		    UnlinkExport( n->imp->isucc );
-		    UnlinkImport( n->imp->isucc ); fges++;
-		    }
+        switch ( n->type ) {
+            case IFRangeGenerate:
+                if ( n->exp != n->exp->dst->imp ) {
+                    UnlinkExport( n->imp->isucc );
+                    UnlinkImport( n->imp->isucc ); fges++;
+                    }
  
-		break;
-
-	    default:
-		e = FindExport( n, 2 );
-
-		if ( IsExport( f->F_BODY, e->iport ) ||
-		     IsExport( f->F_RET,  e->iport )  )
+                break;
+
+            default:
+                e = FindExport( n, 2 );
+
+                if ( IsExport( f->F_BODY, e->iport ) ||
+                     IsExport( f->F_RET,  e->iport )  )
                     break;
 
                 UnlinkExport( e );
-		UnlinkImport( e ); fges++;
+                UnlinkImport( e ); fges++;
                 
-		break;
-	    }
-	}
+                break;
+            }
+        }
 }
 
 
@@ -829,30 +839,30 @@
     register int   iport;
 
     for ( e = n->exp; e != NULL; e = e->esucc )
-	if ( e->eport == eport )
-	    break;
+        if ( e->eport == eport )
+            break;
 
     if ( e == NULL )
-	return;
+        return;
 
     iport = e->iport;
 
     for ( e = e->esucc; e != NULL; e = se ) {
-	se = e->esucc;
-
-	if ( e->eport != eport )
-	    continue;
+        se = e->esucc;
+
+        if ( e->eport != eport )
+            continue;
 
         ChangeExportPorts( n1, e->iport, iport );
 
-	if ( n2 != NULL )
-	    ChangeExportPorts( n2, e->iport, iport );
-
-	UnlinkImport( e );
-	UnlinkExport( e );
-	/* free( e ); */
-	fan++;
-	}
+        if ( n2 != NULL )
+            ChangeExportPorts( n2, e->iport, iport );
+
+        UnlinkImport( e );
+        UnlinkExport( e );
+        /* free( e ); */
+        fan++;
+        }
 }
 
 
@@ -870,16 +880,16 @@
     register PEDGE se;
 
     for ( e = n->exp; e != NULL; e = se ) {
-	se = e->esucc;
-
-	UnlinkExport( e );
-
-	e->CoNsT = "1";
-	e->src   = NULL;
-	e->esucc = NULL;
-	e->epred = NULL;
-	e->eport = CONST_PORT;
-	}
+        se = e->esucc;
+
+        UnlinkExport( e );
+
+        e->CoNsT = "1";
+        e->src   = NULL;
+        e->esucc = NULL;
+        e->epred = NULL;
+        e->eport = CONST_PORT;
+        }
 
     OptRemoveDeadNode( n );
     sliml++;
@@ -900,30 +910,30 @@
     register PEDGE  e;
     register PEDGE  se;
     register char  *r;
-	     char   buf[100];
+             char   buf[100];
 
     if ( DeBuG ) return;
 
     i = n->imp;
 
     if ( IsInteger( i->info ) )
-	SPRINTF( buf, "%d", -atoi( i->CoNsT ) );
+        SPRINTF( buf, "%d", -atoi( i->CoNsT ) );
     else
-	SPRINTF( buf, "%.16e", -atof( DoubleToReal( i->CoNsT ) ) );
+        SPRINTF( buf, "%.16e", -atof( DoubleToReal( i->CoNsT ) ) );
 
     r = CopyString( buf );
 
     /* ASSIGN THE NEGATED CONSTANT TO ALL EXPORTS OF NODE n AND DISCARD n */
 
     for ( e = n->exp; e != NULL; e = se ) {
-	se = e->esucc;
-
-	e->CoNsT = r;
-	e->eport = CONST_PORT;
-	e->esucc = NULL;
-	e->epred = NULL;
-	e->src   = NULL;
-	}
+        se = e->esucc;
+
+        e->CoNsT = r;
+        e->eport = CONST_PORT;
+        e->esucc = NULL;
+        e->epred = NULL;
+        e->src   = NULL;
+        }
 
     n->exp = NULL;
     OptRemoveDeadNode( n ); foldcnt++;
@@ -960,10 +970,10 @@
     /* IS THE ASetL NODE A CANDIDATE FOR REMOVAL? */
 
     if ( !IsArray( a->info ) || IsConst( a ) )           /* STREAM OR STRING */
-	return;
+        return;
 
     if ( UsageCount( a->src, a->eport ) > 1 )
-	return;
+        return;
 
     /* CONDITION ONE: x := array[b:...]; y := array_setl(x,lo); */
     if ( a->src->type == IFABuild ) {
@@ -972,7 +982,7 @@
       }
 
     if ( !( IsForall( a->src ) || IsLoop( a->src ) ) )
-	return;
+        return;
 
     if ( IsForall( a->src ) )
         i = FindImport( a->src->F_RET, a->eport );
@@ -981,21 +991,21 @@
 
     switch ( i->src->type ) {
       case IFAGather:
-	lb = i->src->imp;
-	break;
+        lb = i->src->imp;
+        break;
 
       case IFReduce:
       case IFRedTree:
       case IFRedRight:
       case IFRedLeft:
         if ( i->src->imp->CoNsT[0] != REDUCE_CATENATE )
-	  return;
-
-	lb = i->src->imp->isucc;
-	break;
+          return;
+
+        lb = i->src->imp->isucc;
+        break;
 
       default:
-	return;
+        return;
       }
 
 DoRemoval:
@@ -1003,25 +1013,25 @@
     /* NODE MOVEMENT NOT REQUIRED SINCE THE LOWER BOUND IS A CONSTANT */
 
     if ( IsConst( l ) ) {
-	if ( IsConst( lb ) )
-	    lb->CoNsT = l->CoNsT;
+        if ( IsConst( lb ) )
+            lb->CoNsT = l->CoNsT;
         else
-	    ChangeEdgeToConst( lb, l );
+            ChangeEdgeToConst( lb, l );
 
         for ( e = s->exp; e != NULL; e = e->esucc )
-	    e->eport = a->eport;
+            e->eport = a->eport;
 
         LinkExportLists( a->src, s );
-	OptRemoveDeadNode( s ); scnt++;
-
-	return;
-	}
+        OptRemoveDeadNode( s ); scnt++;
+
+        return;
+        }
 
     /* MAKE SURE THAT DATA FLOW ORDERING IS PRESERVED */
 
     for ( n = a->src; n != s; n = n->nsucc )
         if ( n == l->src )
-	    return;
+            return;
 
 /* THREAD THE LOWER BOUND INTO THE FORALL NODE AND TO THE GATHER NODE. */
     
@@ -1030,18 +1040,18 @@
     LinkImport( a->src, l );
 
     for ( e = s->exp; e != NULL; e = e->esucc )
-	e->eport = a->eport;
+        e->eport = a->eport;
 
     LinkExportLists( a->src, s );
 
     if ( IsConst( lb ) ) {
-	lb->CoNsT = NULL;
-	lb->eport = maxint;
-
-	LinkExport( i->dst, lb );
-	}
+        lb->CoNsT = NULL;
+        lb->eport = maxint;
+
+        LinkExport( i->dst, lb );
+        }
     else
-	lb->eport = maxint;
+        lb->eport = maxint;
 
     OptRemoveDeadNode( s );  scnt++;
 
@@ -1069,51 +1079,51 @@
              char   buf[100];
 
     for ( i = n->imp; i != NULL; i = i->isucc ) {
-	if ( !(IsConst( i ) && IsArray( i->info )) )  /* STRING CONSTANT? */
-	    continue;
+        if ( !(IsConst( i ) && IsArray( i->info )) )  /* STRING CONSTANT? */
+            continue;
 
         if ( (s = i->CoNsT) == NULL )          /* ERROR STRING CONSTANT?  */
-	    continue;
+            continue;
 
         /* ALLOCATE ABuild NODE AND LINK TO THE SCOPE'S NODE LIST         */
 
         bld = NodeAlloc( ++maxint, IFABuild ); conv++;
-	CopyVitals( n, bld );
+        CopyVitals( n, bld );
 
         if ( IsGraph( n ) )
-	    LinkNode( n, bld );
+            LinkNode( n, bld );
         else
-	    LinkNode( n->npred, bld );
+            LinkNode( n->npred, bld );
 
         /* ATTACH THE LOWER BOUND TO THE ABuild NODE                      */
 
         c = EdgeAlloc( NULL_NODE, CONST_PORT, bld, 1 );
         c->info  = integer;
-	c->CoNsT = "1";
+        c->CoNsT = "1";
 
         LinkImport( bld, c );
 
         /* ATTACH CHARACTERS OF THE STRING TO THE ABuild NODE             */
 
         for ( idx = 0, ip = 2; *s != '\0'; idx = 0, ip++ ) {
-	    if ( (buf[idx++] = *s++) == '\\' ) {
+            if ( (buf[idx++] = *s++) == '\\' ) {
                 if ( IsOctal( *s ) )
-		    while ( IsOctal( *s ) ) 
-		        buf[idx++] = *s++;
+                    while ( IsOctal( *s ) ) 
+                        buf[idx++] = *s++;
                 else if ( *s == '\0' )
-		    Error1( "StringToChars: ILLEGAL BACKSLASH SEQUENCE" );
-	        else
+                    Error1( "StringToChars: ILLEGAL BACKSLASH SEQUENCE" );
+                else
                     buf[idx++] = *s++;
-	        }
+                }
 
             buf[idx] = '\0';
 
-	    c = EdgeAlloc( NULL_NODE, CONST_PORT, bld, ip );
-	    c->info  = i->info->A_ELEM;
-	    c->CoNsT = CopyString( buf );
-
-	    LinkImport( bld, c );
-	    }
+            c = EdgeAlloc( NULL_NODE, CONST_PORT, bld, ip );
+            c->info  = i->info->A_ELEM;
+            c->CoNsT = CopyString( buf );
+
+            LinkImport( bld, c );
+            }
 
         /* LINK i TO bld'S EXPORT LIST                                    */
 
@@ -1144,28 +1154,28 @@
     if ( DeBuG ) return;
 
     if ( IsNot( n ) ) {
-	if ( IsConst( n->imp ) )
-	    return;
-
-	src = n->imp->src;
-
-	if ( (src->exp->esucc == NULL) && (IsNot( src )) ) {
-	    for ( e = n->exp; e != NULL; e = se ) {
-		se = e->esucc;
-
-		if ( IsConst( src->imp ) )
-		    ChangeEdgeToConst( e, src->imp );
+        if ( IsConst( n->imp ) )
+            return;
+
+        src = n->imp->src;
+
+        if ( (src->exp->esucc == NULL) && (IsNot( src )) ) {
+            for ( e = n->exp; e != NULL; e = se ) {
+                se = e->esucc;
+
+                if ( IsConst( src->imp ) )
+                    ChangeEdgeToConst( e, src->imp );
                 else
-		    e->eport = src->imp->eport;
+                    e->eport = src->imp->eport;
                 }
 
             if ( !IsConst( n->imp->src->imp ) )
-		LinkExportLists( src->imp->src, n );
-
-	    OptRemoveDeadNode( n ); redn++;
-
-	    return;
-	    }
+                LinkExportLists( src->imp->src, n );
+
+            OptRemoveDeadNode( n ); redn++;
+
+            return;
+            }
         }
 
     return;
@@ -1211,27 +1221,27 @@
       return;
 
     for ( ;; ) {
-	/* IS THE UNIT VALUE REFERENCED WITHIN COMPOUND NODE c?           */
-
-	for ( g = c->C_SUBS; g != NULL; g = g->gsucc )
+        /* IS THE UNIT VALUE REFERENCED WITHIN COMPOUND NODE c?           */
+
+        for ( g = c->C_SUBS; g != NULL; g = g->gsucc )
             if ( IsExport( g, p ) )
-		return;
-
-	u = FindImport( c, p );
-
-	UnlinkExport( u );
-	UnlinkImport( u );
-
-	/* CONTINUE ONLY IF u->src IS A SUBGRAPH                          */
-
-	if ( !IsSGraph( u->src ) ) {
-	    OptRemoveDeadNode( u->src );
-	    return;
-	    }
-
-	c = u->src->G_DAD;
-	p = u->eport;
-	}
+                return;
+
+        u = FindImport( c, p );
+
+        UnlinkExport( u );
+        UnlinkImport( u );
+
+        /* CONTINUE ONLY IF u->src IS A SUBGRAPH                          */
+
+        if ( !IsSGraph( u->src ) ) {
+            OptRemoveDeadNode( u->src );
+            return;
+            }
+
+        c = u->src->G_DAD;
+        p = u->eport;
+        }
 }
 
 
@@ -1257,11 +1267,11 @@
       case REDUCE_PRODUCT:
       case REDUCE_SUM:
       case REDUCE_USER:
-	break;
+        break;
 
       default:
-	fprintf(stderr,"Warning: Bad reduction \"%s\" on IF1 line %d\n",
-		n->imp->CoNsT,n->imp->if1line);
+        fprintf(stderr,"Warning: Bad reduction \"%s\" on IF1 line %d\n",
+                n->imp->CoNsT,n->imp->if1line);
       }
       /* Fall through... */
 
@@ -1308,11 +1318,11 @@
       case REDUCE_PRODUCT:
       case REDUCE_SUM:
       case REDUCE_USER:
-	break;
+        break;
 
       default:
-	fprintf(stderr,"Warning: Bad reduction \"%s\" on IF1 line %d\n",
-		n->imp->CoNsT,n->imp->if1line);
+        fprintf(stderr,"Warning: Bad reduction \"%s\" on IF1 line %d\n",
+                n->imp->CoNsT,n->imp->if1line);
       }
       /* Fall through... */
     case IFAGather:
@@ -1351,46 +1361,46 @@
     register PEDGE i;
 
     if ( IsForall( l ) )
-	n = l->F_RET->G_NODES;
+        n = l->F_RET->G_NODES;
     else
-	n = l->L_RET->G_NODES;
+        n = l->L_RET->G_NODES;
 
     for ( /* EMPTY */; n != NULL; n = n->nsucc ) {
-	if ( !IsReturn( n ) )
-	    return( FALSE );
-
-	if ( native ) {
-	    EliminateFanout( n, l, NULL_NODE, 1 );
-
-	    switch ( n->type ) {
-		case IFFirstValue:
-		    Error1( "IFFirstValue NOT IMPLEMENTED" );
-		    break;
-
-		case IFRestValues:
-		    Error1( "returns old NOT IMPLEMENTED" );
-		    break;
-
-		case IFReduce:
-		case IFRedLeft:
-		case IFRedRight:
-		case IFRedTree:
-		    if ( n->imp->CoNsT[0] == REDUCE_CATENATE )
-			ConvertReduceCatenate( n );
-
-		    break;
-
-	        case IFFinalValue:
-		    break;
-
-		default:
-		    break;
-		}
+        if ( !IsReturn( n ) )
+            return( FALSE );
+
+        if ( native ) {
+            EliminateFanout( n, l, NULL_NODE, 1 );
+
+            switch ( n->type ) {
+                case IFFirstValue:
+                    Error1( "IFFirstValue NOT IMPLEMENTED" );
+                    break;
+
+                case IFRestValues:
+                    Error1( "returns old NOT IMPLEMENTED" );
+                    break;
+
+                case IFReduce:
+                case IFRedLeft:
+                case IFRedRight:
+                case IFRedTree:
+                    if ( n->imp->CoNsT[0] == REDUCE_CATENATE )
+                        ConvertReduceCatenate( n );
+
+                    break;
+
+                case IFFinalValue:
+                    break;
+
+                default:
+                    break;
+                }
             }
 
         for ( i = n->imp; i != NULL; i = i->isucc )
-	    if ( IsConst( i ) && IsArray( i->info ) )
-		return( FALSE );
+            if ( IsConst( i ) && IsArray( i->info ) )
+                return( FALSE );
         }
 
     return( TRUE );
@@ -1412,32 +1422,32 @@
     register PEDGE i;
 
     if ( n == NULL )
-	return;
+        return;
 
     switch ( n->type ) {
-	case IFNot:
-	case IFLess:
-	case IFLessEqual:
-	case IFEqual:
-	case IFNotEqual:
+        case IFNot:
+        case IFLess:
+        case IFLessEqual:
+        case IFEqual:
+        case IFNotEqual:
             break;
 
-	case IFSGraph:
+        case IFSGraph:
             return;
 
-	case IFPlus:
-	case IFTimes:
-	    if ( IsBoolean( n->exp->info ) )
-		break;
+        case IFPlus:
+        case IFTimes:
+            if ( IsBoolean( n->exp->info ) )
+                break;
 
         default:
-	    return;
-	}
+            return;
+        }
 
     n->label = -(n->label);
 
     for ( i = n->imp; i != NULL; i = i->isucc )
-	MarkLegalTestNodes( i->src );
+        MarkLegalTestNodes( i->src );
 }
 
 
@@ -1465,26 +1475,26 @@
         sn = n->nsucc;
 
         if ( n->label > 0 ) {
-	    if ( l->type == IFLoopA ) {
+            if ( l->type == IFLoopA ) {
                 RemoveNode( n, l->L_TEST );
                 InsertNode( l->L_BODY, n );
 
                 latnm++;
-	    } else {
-		RemoveNode( n, l->L_TEST );
-
-		CopyExports( n, nn = CopyNode( n ) );
-		CopyImports( n, nn, FALSE );
-
-		InsertNode( l->L_INIT, n );
-		InsertNode( l->L_BODY, nn );
-
-		lbtnm++;
-		}
-	    }
+            } else {
+                RemoveNode( n, l->L_TEST );
+
+                CopyExports( n, nn = CopyNode( n ) );
+                CopyImports( n, nn, FALSE );
+
+                InsertNode( l->L_INIT, n );
+                InsertNode( l->L_BODY, nn );
+
+                lbtnm++;
+                }
+            }
         else
             n->label = -(n->label);
-	}
+        }
 }
 
 
@@ -1533,186 +1543,186 @@
     FixBooleanAndErrorConsts( g );
 
     for ( n = g->G_NODES; n != NULL; n = nn ) {
-	nn = n->nsucc;
-
-	ConvertStringImports( n );
+        nn = n->nsucc;
+
+        ConvertStringImports( n );
         FixBooleanAndErrorConsts( n );
 
-	if ( IsCall( n ) )
-	  n->imp->CoNsT = LowerCase( n->imp->CoNsT, FALSE, FALSE );
-
-	if ( n->exp == NULL ) {
-	  OptRemoveDeadNode( n );
-	  continue;
-	  }
-
-	ConvertStringImports( n );
+        if ( IsCall( n ) )
+          n->imp->CoNsT = LowerCase( n->imp->CoNsT, FALSE, FALSE );
+
+        if ( n->exp == NULL ) {
+          OptRemoveDeadNode( n );
+          continue;
+          }
+
+        ConvertStringImports( n );
         FixBooleanAndErrorConsts( n );
 
         switch ( n->type ) {
-	    case IFExp:
-	      /* ELIMINATE FRONTEND INTRODUCED INEFFICIENCY  */
-	      if ( !IsInteger( n->imp->info ) )
-		break;
-
-	      if ( !IsInteger( n->imp->isucc->info ) )
-		break;
-
-	      if ( IsInteger( n->exp->info ) )
-		break;
-
-	      if ( n->exp->esucc != NULL )
-		break;
-
-	      if ( !IsInt( n->exp->dst ) )
-		break;
-
-	      e = n->exp;
-	      UnlinkExport( e );
-	      LinkExportLists( n, e->dst );
-	      UnlinkNode( e->dst );
-	      /* free( e->dst ); */
-	      /* free( e ); */
-
-	      nn = n->nsucc;
-	      break;
-
-	    case IFLoopA:
-	    case IFLoopB:
-		NormalizeLoopRet( n );
+            case IFExp:
+              /* ELIMINATE FRONTEND INTRODUCED INEFFICIENCY  */
+              if ( !IsInteger( n->imp->info ) )
+                break;
+
+              if ( !IsInteger( n->imp->isucc->info ) )
+                break;
+
+              if ( IsInteger( n->exp->info ) )
+                break;
+
+              if ( n->exp->esucc != NULL )
+                break;
+
+              if ( !IsInt( n->exp->dst ) )
+                break;
+
+              e = n->exp;
+              UnlinkExport( e );
+              LinkExportLists( n, e->dst );
+              UnlinkNode( e->dst );
+              /* free( e->dst ); */
+              /* free( e ); */
+
+              nn = n->nsucc;
+              break;
+
+            case IFLoopA:
+            case IFLoopB:
+                NormalizeLoopRet( n );
 
                 if ( !IsRetNormalized( n ) )
-		    Error1( "LOOP RETURN SUBGRAPHS NOT NORMALIZED" );
-
-	        NormalizeLoopTest( n );
-
-		for ( nd = n->L_TEST->G_NODES; nd != NULL; nd = sn ) {
-		    sn = nd->nsucc;
-
-		    if ( IsNot( nd ) )
-			RemoveNotNodePair( nd );    /* MAY REMOVE NODE nd */
+                    Error1( "LOOP RETURN SUBGRAPHS NOT NORMALIZED" );
+
+                NormalizeLoopTest( n );
+
+                for ( nd = n->L_TEST->G_NODES; nd != NULL; nd = sn ) {
+                    sn = nd->nsucc;
+
+                    if ( IsNot( nd ) )
+                        RemoveNotNodePair( nd );    /* MAY REMOVE NODE nd */
                     }
 
-	        NormalizeNodes( n->L_INIT );
-	        NormalizeNodes( n->L_BODY );
-
-	        for ( nd = n->L_INIT->G_NODES; nd != NULL; nd = sn ) {
-		    sn = nd->nsucc;
-
-		    RemoveNode( nd, n->L_INIT );
-		    InsertNode( n, nd );
-
-		    linm++;
-		    }
-
-	        break;
-
-	    case IFForall:
+                NormalizeNodes( n->L_INIT );
+                NormalizeNodes( n->L_BODY );
+
+                for ( nd = n->L_INIT->G_NODES; nd != NULL; nd = sn ) {
+                    sn = nd->nsucc;
+
+                    RemoveNode( nd, n->L_INIT );
+                    InsertNode( n, nd );
+
+                    linm++;
+                    }
+
+                break;
+
+            case IFForall:
 StartForall:
-		NormalizeForallRet( n );
+                NormalizeForallRet( n );
 
                 if ( !IsRetNormalized( n ) )
-		    Error1( "FORALL RETURN SUBGRAPHS NOT NORMALIZED" );
+                    Error1( "FORALL RETURN SUBGRAPHS NOT NORMALIZED" );
 
                 NormalizeGenerateSubgraph( n );
                 NormalizeNodes( n->F_BODY );
 
-	        break;
-
-	    case IFSelect:
-	        if ( !IsNodeListEmpty( n->S_TEST ) )
-		    Error1( "SELECT TEST SUBGRAPHS NOT NORMALIZED" );
-
-		RemoveIntNode( n );
-
-	    case IFTagCase:
-	        for ( g = n->C_SUBS; g != NULL; g = g->gsucc )
-		    NormalizeNodes( g );
-
-	        break;
+                break;
+
+            case IFSelect:
+                if ( !IsNodeListEmpty( n->S_TEST ) )
+                    Error1( "SELECT TEST SUBGRAPHS NOT NORMALIZED" );
+
+                RemoveIntNode( n );
+
+            case IFTagCase:
+                for ( g = n->C_SUBS; g != NULL; g = g->gsucc )
+                    NormalizeNodes( g );
+
+                break;
 
             case IFNot:
-	        RemoveNotNodePair( n );
-		break;
-
-	    case IFASetL:
-		if ( !asetl )
-		    break;
-
-		RemoveSetLowNode( n );
-                break;
-
-	    case IFNeg:
-		if ( !sgnok )
-		    break;
-
-		if ( IsConst( n->imp ) )
-		    FoldNegNode( n );
-
-                break;
-		
-	    case IFALimL:
-		if ( !IsStream( n->imp->info ) )
-		    break;
-
-		RemoveSLimLNode( n );
-		break;
-
-	    case IFIsError:
-		if ( native )
-		  BindIsError( n );
-
-                break;
-
-	    case IFNoOp:
-		if ( native )
-		    Error1( "IFNoOp NOT IMPLEMENTED" );
-
-                break;
-
-	    case IFBindArguments:
-		if ( native )
-		    Error1( "IFBindArguments NOT IMPLEMENTED" );
-
-                break;
-
-	    case IFAFill:
-		if ( native ) {
-		  if ( IsStream( n->exp->info ) )
-		    Error1( "STREAM IFAFill NOT IMPLEMENTED" );
-
-		  ConvertFillToForall( n );
-		  goto StartForall;
+                RemoveNotNodePair( n );
+                break;
+
+            case IFASetL:
+                if ( !asetl )
+                    break;
+
+                RemoveSetLowNode( n );
+                break;
+
+            case IFNeg:
+                if ( !sgnok )
+                    break;
+
+                if ( IsConst( n->imp ) )
+                    FoldNegNode( n );
+
+                break;
+                
+            case IFALimL:
+                if ( !IsStream( n->imp->info ) )
+                    break;
+
+                RemoveSLimLNode( n );
+                break;
+
+            case IFIsError:
+                if ( native )
+                  BindIsError( n );
+
+                break;
+
+            case IFNoOp:
+                if ( native )
+                    Error1( "IFNoOp NOT IMPLEMENTED" );
+
+                break;
+
+            case IFBindArguments:
+                if ( native )
+                    Error1( "IFBindArguments NOT IMPLEMENTED" );
+
+                break;
+
+            case IFAFill:
+                if ( native ) {
+                  if ( IsStream( n->exp->info ) )
+                    Error1( "STREAM IFAFill NOT IMPLEMENTED" );
+
+                  ConvertFillToForall( n );
+                  goto StartForall;
                   }
 
                 break;
 
-	    case IFACatenate:
-		if ( native )
+            case IFACatenate:
+                if ( native )
                     if ( n->imp->isucc->isucc != NULL )
-		        Error1( "IFACatenate: > 2 IMPORTS NOT IMPLEMENTED" );
-
-                break;
-
-	    case IFALimH:
-		if ( native )
-		    if ( IsStream( n->imp->info ) )
-		        Error1( "STREAM IFALimH NOT IMPLEMENTED" );
-
-                break;
-
-	    case IFASize:
-                break;
-
-	    case IFAIsEmpty:
-		if ( native )
-		    if ( IsArray( n->imp->info ) )
-		        Error1( "ARRAY IFAIsEmpty NOT IMPLEMENTED" );
-
-                break;
-
-	    default:
-	        break;
+                        Error1( "IFACatenate: > 2 IMPORTS NOT IMPLEMENTED" );
+
+                break;
+
+            case IFALimH:
+                if ( native )
+                    if ( IsStream( n->imp->info ) )
+                        Error1( "STREAM IFALimH NOT IMPLEMENTED" );
+
+                break;
+
+            case IFASize:
+                break;
+
+            case IFAIsEmpty:
+                if ( native )
+                    if ( IsArray( n->imp->info ) )
+                        Error1( "ARRAY IFAIsEmpty NOT IMPLEMENTED" );
+
+                break;
+
+            default:
+                break;
             }
         }
 }
@@ -1729,58 +1739,58 @@
   for ( n = g->G_NODES; n != NULL; n = n->nsucc ) {
     if ( IsCompound( n ) )
       for ( sg = n->C_SUBS; sg != NULL; sg = sg->gsucc )
-	ConvertStreamsToArrays( sg );
+        ConvertStreamsToArrays( sg );
 
     switch ( n->type ) {
       case IFPrefixSize:
       case IFASize:
-	if ( IsStream( n->imp->info ) )
-	  Error1( "STREAM_SIZE AND STREAM_PREFIXSIZE NOT IMPLEMENTED" );
-
-	break;
+        if ( IsStream( n->imp->info ) )
+          Error1( "STREAM_SIZE AND STREAM_PREFIXSIZE NOT IMPLEMENTED" );
+
+        break;
 
       case IFAIsEmpty:         /* STREAM_EMPTY      */
-	n->type = IFASize;
-
-	nn = NodeAlloc( ++maxint, IFLess );
-	CopyVitals( n, nn );
-	LinkNode( n, nn );
-	LinkExportLists( nn, n );
+        n->type = IFASize;
+
+        nn = NodeAlloc( ++maxint, IFLess );
+        CopyVitals( n, nn );
+        LinkNode( n, nn );
+        LinkExportLists( nn, n );
 
         e = EdgeAlloc( NULL_NODE, CONST_PORT, nn, 2 );
         e->info  = integer;
-	e->CoNsT = "1";
-	LinkImport( nn, e );
-
-	e = EdgeAlloc( n, 1, nn, 1 );
-	e->info = integer;
-	LinkExport( n, e );
-	LinkImport( nn, e );
-	break;
+        e->CoNsT = "1";
+        LinkImport( nn, e );
+
+        e = EdgeAlloc( n, 1, nn, 1 );
+        e->info = integer;
+        LinkExport( n, e );
+        LinkImport( nn, e );
+        break;
 
       case IFARemL:
-	if ( !IsStream( n->imp->info ) )
-	  break;
-
-	/* STREAM_REST */
-	nn = NodeAlloc( ++maxint, IFASetL );
-	CopyVitals( n, nn );
-	LinkNode( n, nn );
-	LinkExportLists( nn, n );
+        if ( !IsStream( n->imp->info ) )
+          break;
+
+        /* STREAM_REST */
+        nn = NodeAlloc( ++maxint, IFASetL );
+        CopyVitals( n, nn );
+        LinkNode( n, nn );
+        LinkExportLists( nn, n );
 
         e = EdgeAlloc( NULL_NODE, CONST_PORT, nn, 2 );
         e->info  = integer;
-	e->CoNsT = "1";
-	LinkImport( nn, e );
-
-	e = EdgeAlloc( n, 1, nn, 1 );
-	e->info = n->imp->info;
-	LinkExport( n, e );
-	LinkImport( nn, e );
-	break;
-	
+        e->CoNsT = "1";
+        LinkImport( nn, e );
+
+        e = EdgeAlloc( n, 1, nn, 1 );
+        e->info = n->imp->info;
+        LinkExport( n, e );
+        LinkImport( nn, e );
+        break;
+        
       default:
-	break;
+        break;
       }
     }
 }
@@ -1810,26 +1820,26 @@
 
     for ( i = ihead; i != NULL; i = i->next )
       switch ( i->type ) {
-	case IF_STREAM:
-	  if ( IsRecursive( i, NULL_INFO ) )
-	    Error1( "ILLEGAL RECURSIVE STREAM ENCOUNTERED" );
+        case IF_STREAM:
+          if ( IsRecursive( i, NULL_INFO ) )
+            Error1( "ILLEGAL RECURSIVE STREAM ENCOUNTERED" );
 
           break;
 
-	case IF_ARRAY:
-	  if ( IsRecursive( i, NULL_INFO ) )
-	    Error1( "ILLEGAL RECURSIVE ARRAY ENCOUNTERED" );
+        case IF_ARRAY:
+          if ( IsRecursive( i, NULL_INFO ) )
+            Error1( "ILLEGAL RECURSIVE ARRAY ENCOUNTERED" );
 
           break;
 
-	case IF_RECORD:
-	  if ( IsRecursive( i, NULL_INFO ) )
-	    Error1( "ILLEGAL RECURSIVE RECORD ENCOUNTERED" );
-
-	  break;
+        case IF_RECORD:
+          if ( IsRecursive( i, NULL_INFO ) )
+            Error1( "ILLEGAL RECURSIVE RECORD ENCOUNTERED" );
+
+          break;
 
         default:
-	  break;
+          break;
         }
 
     for ( i = ihead; i != NULL; i = i->next )
@@ -1840,13 +1850,13 @@
 
     for ( i = ihead; i != NULL; i = i->next )
         if ( IsStream(i) ) {
-	    i->type = IF_ARRAY;
-
-	    /* RECORD THAT THIS CONVERTED TYPE WAS ONCE A STREAM!!! */
-	    /* THIS IS USED TO GET PROPER FIBRE PROCESSING OF INPUT */
-	    /* AND OUTPUT STREAMS.                                  */
-	    i->mark = 'S';
-	    }
+            i->type = IF_ARRAY;
+
+            /* RECORD THAT THIS CONVERTED TYPE WAS ONCE A STREAM!!! */
+            /* THIS IS USED TO GET PROPER FIBRE PROCESSING OF INPUT */
+            /* AND OUTPUT STREAMS.                                  */
+            i->mark = 'S';
+            }
     }