This is the mail archive of the 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] Problem with constant folding

In message <>, Zdenek Dvorak wri
 >>  >>  >[snip] (
 >>  >>  >
 >>  >>  >> The patch below fixes the problem by preventing the overflowed cons
 >>  >s
 >>  >>  >> from being propagated.  It is probably way too conservative, but I 
 >>  >>  >> not able to determine the place where to fix the problem in other w
 >>  >>  >
 >>  >>  >... and unfortunately it is also wrong, since it fails to bootstrap. 
 >>  >>  >someone has an idea what is the right way to fix this?
 >>  >> Your approach seems pretty reasonable.  And it seems extremely odd that
 >>  >> it wouldn't bootstrap since it ought to just force such constants into
 >>  >> new variables and prevent them from being propagated by the optimizers.
 >>  >> 
 >>  >> I'd suggest investigating why the patch didn't bootstrap.
 >>  >
 >>  >because gimplification fails when constants are not considered to be
 >>  >invariant. 
 >> And why is that?  It would seem to me that gimplification in this case
 >> should put the overflowed constant into a temporary then move on to
 >> something more interesting.
 >with the change to is_gimple_rhs the things seem to work; I have not
 >however run a full regtesting yet.
Just for fun I installed the patch and did some quick tests.  It is 
triggering a few regressions, probably because we're not checking the
overflow flag before recording values into the hash tables in
tree-ssa-dom.c and tree-ssa-ccp.c.

I'm going to update the problematical code in tree-ssa-dom.c and tree-ssa-ccp.c
and try again.


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