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] Fix undefined label problem after crossjumping (PR rtl-optimization/64536)


On Fri, 9 Jan 2015, Jakub Jelinek wrote:

> On Fri, Jan 09, 2015 at 03:10:16PM +0100, Richard Biener wrote:
> > Well, you have until the end of next week ;)  For GIMPLE this is
> > a switch with all cases going to the same basic-block, right?
> > I think we optimize that in cleanup_control_expr_graph via the
> > single_succ_p case?
> 
> No, it is a switch with cases that all look like:
>   _1 = a; // load
>   _2 = _1 + 1;
>   a = _2; // store
> So, either if tree-ssa-tail-merge could be tought about loads/stores,
> or some other pass would be able to hoist the loads before the switch and
> sink the store after the switch, because every switch case does that.

Ah, ok.  Indeed code-hoisting on GIMPLE wasn't finished (there is a
very old PR with patches still), and sinking has the same issue
in that it only exploits partial dead code elimination opportunities.

I think that tail-merging already handles some of these cases, just
maybe not the one with more than two PHI args or switches.

Richard.


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