[tree-ssa] CCP and non-destructive folding problems

Diego Novillo dnovillo@redhat.com
Tue Feb 25 22:33:00 GMT 2003


On Tue, 2003-02-25 at 15:51, law@redhat.com wrote:

> My first checkin handles this correctly to.  If an expression with
> constants doesn't fold, then it's VARYING.  Yes we can miss some
> optimization opportunities, but they should be rare.
> 
Well, we won't know until we measure.

>  >(b) The non-destructive and destructive folders must always
>  >    return the same values.  I've added a (moderately expensive)
>  >    check for this in the final fold pass.
> I don't think we'll want to check this code in as these checks
> are more for finding cases where we should improve the nondestructive
> folder as opposed to detecting hard bugs.
> 
Could you leave it in exactly for that reason?  If you want, predicate
it on #ifdef TREE_CHECKING and/or have it emit a warning instead of
abort().

> The other thing I'm thinking is that we need to rename the nondestructive
> folder.  While it's true that it's a nondestructive folder, it's also a
> limited subset of folding, specifically it does nondestructive folding of
> expressions to constant values.  If the expression does not simplify to
> a constant, then the folder returns NULL_TREE.
> 
Yes.  That's probably a good idea.


Diego.



More information about the Gcc mailing list