------- Additional Comments From roger at eyesopen dot com  2005-08-20 15:27 
-------
My apologies for adding a comment to an already resolved PR, but I've some
follow-up thoughts on Diego's recent solution to this regression.  From a
high-level perspective, it would probably be more efficient to require that
conditions are always folded as an invariant of our tree-ssa data structures. 
It's better to fold a conditional once when it is constructed/modified,
rather than need to call fold on it each time it is examined.  Some places
that build/modify conditionals may know that fold doesn't need to be (or
has already been) called, whilst requiring the many places that examine CFGs
to call fold themselves is pessimistic.  This also fits well with our recent
"folded by construction" philosophy, using fold_buildN instead of build.

I appreciate that this a meta-issue, and Diego's fix is fine for this problem,
but ultimately I think that placing stricter invariants on our data structures
will reduce the number of unnecessary calls to fold, and speed up the compiler.
Eventually, most calls to build* should be fold_build*, and it should rarely
be necessary to call fold() without a call to build (or in place modification
of a tree).  But perhaps there a valid tree-ssa reasons why this shouldn't be
a long-term goal?


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |roger at eyesopen dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23476

Reply via email to