static char sccsid
[] = "@(#)3.then.c 4.1 (Berkeley) 2/11/83";
#define BRANCHTYPE(t) (t == STOPVX || t == RETVX || t == BRKVX || t == NXTVX || t == GOVX)
/* if else clause smaller than MAXCHUNK and smaller than then clause,
and there is no reason not to negate the if, negate the if */
getthen(v
) /* turn IFVX into THEN when appropriate, create else ifs where possible */
else if (BRANCHTYPE(NTYPE(tch
)))
else if (BRANCHTYPE(NTYPE(fch
)))
else if (NTYPE(fch
) != IFVX
|| DEFINED(RSIB(fch
))) /* not an else if */
if ( NTYPE(tch
) == IFVX
&& !DEFINED(RSIB(tch
)))
/* invert into else if */
/* asoc(v,n) returns number of statements associated with v
if (fn
>= 0 && (tn
< 0 || fn
< tn
))
/* else clause smaller */
RECURSE(getthen
,v
,recvar
);
ASSERT(!DEFINED(w
) || (DEFINED(tc
) && BRANCHTYPE(NTYPE(tc
)) ),mkthen
);
LCHILD(v
,ELSE
) = UNDEFINED
;
ASSERT(IFTHEN(v
),mkthen
);
ASSERT(NTYPE(v
) == IFVX
,negate
);
exchange(&LCHILD(v
,THEN
), &LCHILD(v
,ELSE
));