[tree-ssa] CCP and non-destructive folding problems
Diego Novillo
dnovillo@redhat.com
Tue Feb 25 17:28:00 GMT 2003
On Tue, 2003-02-25 at 12:20, law@redhat.com wrote:
> We're clearly missing some important cases in ccp_fold, namely the
> truthops, let's get that fixed, then see if there's anything
> important still missing (sans builtins, which are a complete issue
> unto themselves.).
>
Oh, that and builtins are fixed by the patch I sent you already. That's
why I mentioned them. Those are the two that I caught initially.
>
> >If we mark it VARYING due to limitations in the nondestructive
> >folder, we may end up blocking further propagation of constants.
> >In the case of '1 && 1', the variable that the expression was
> >being assigned to was never considered constant.
> Yes, but if you don't mark it varying, you end up with an algorithm
> that you can't prove completes and with a ton of collateral damage
> trying to fix it up.
>
Au contraire. The algorithm completes in fewer iterations. Remember
that UNDEFINED values are short circuit for PHI expression evaluations.
They imply no change of state. Ergo, the main loop finishes sooner.
Alternately, we can preserve the status quo and allow VARYING->CONSTANT
and VARYING->UNDEFINED transitions.
Diego.
More information about the Gcc
mailing list