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: [patch] tree-ssa-forwprop.c: Rewrite.


Hi Jeff,

Thanks for a review.

> If you wanted to get really ambitious you could reformulate this as
> a real tree combiner pass.  All it's doing is combining an
> assignment statement and a COND_EXPR when doing so results in a
> gimple COND_EXPR.  But I'm certainly not going to require you to do
> that -- your change is a nice cleanup we get from having good access
> to immediate use information.

Sure.  I was actually thinking about extending this rewritten forwprop
pass.  Unlike the RTL combiner, GIMPLE doesn't have a lot of
combinable cases if we want to fold multiple statements into a single
GIMPLE statement, so for a start, I am thinking about detecting common
combinable cases like two successive casts and whatnot and let fold do
its job.

My main goal is to reduce the number of statements as quickly as
possible so that the time used to combine statements is offset by
reduced time in other optimizers.  Also, eliminating successive casts
often expose copy statements of the form "SSA_NAME = SSA_NAME;", which
I am sure other optimizers would love to pick up and take advantage
of.

> I have a vague feeling that I wrote at least one other pass in a
> similar manner to deal with the relatively high overhead of our old
> immediate use information.  There may be another big cleanup just
> waiting for someone to tackle it.

OK.  I'll lazily look for it.

> Which is fine.  But the comments really need to be updated.   Consider
> the patch pre-approved after fixing those minor nits.

OK.  I'll check in when the mainline gets a sane moment.

Kazu Hirata


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