This is the mail archive of the gcc-patches@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] Fix cgraph related PR opt/13729


On Mon, 19 Jan 2004, Jan Hubicka wrote:
> I actually do believe that it makes sense to postnote these
> transformations for later.  For instance if profile says that A is
> always true, may be profitable to not do the transformation at all.

One could argue that BRANCH_COST should be lower when performing
profile based optimizations than when not.  The average taken/not
cycle penalty should be lower.  Food for thought...


> In fact it may make sense to rewrite the code above back for early
> passes.  The '|' trick is easilly rewritable and I think it is the
> only case users commonly do.

This also sounds like a very reasonable suggestion.  My concern is
that for suitable "a" and "b", GCC should consider "(a | b) == 0"
and "a == 0 || b == 0" equivalent.  Whether we canonicalize these
to the first form or the second is arbitrary, so can be made based
upon which we'll optimize better in later passes.


I'll do some experimenting to convince myself that these transformations
will get applied during if-conversion.  If they get performed anyway,
are there any CONs against the removal of these optimizations?


Roger
--


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