https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80155
--- Comment #41 from rguenther at suse dot de <rguenther at suse dot de> --- On Wed, 1 Aug 2018, prathamesh3492 at gcc dot gnu.org wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80155 > > --- Comment #40 from prathamesh3492 at gcc dot gnu.org --- > ping https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80155#c38 > > Thanks, > Prathamesh Well, all heuristics will have up and downsides. In principle re-ordering sinking and PRE makes sense but given it isn't only "sinking" side-effects of this need to be watched. I suppose similar as to how PRE hoists code it should also sink, removing the need of a separate (ad-hoc!) sinking pass. Note that both passes are confused by dead code. But yes, in general a live-range shrinking pass is what would improve the situation in the best possible way given the exact situation created by PRE & friends can be created by adjusting the testcase in source. One complication with the idea of a live-shrinking pass is that we have TER. Bernd has done some kind of live-shrinking pass before that wasn't merged. I think I pointed you to it at some point.