This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


On Tue, 2003-02-25 at 15:51, law at redhat dot 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]