This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix undefined label problem after crossjumping (PR rtl-optimization/64536)
- From: Richard Biener <rguenther at suse dot de>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: Eric Botcazou <ebotcazou at adacore dot com>, Jeff Law <law at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Mon, 12 Jan 2015 10:03:09 +0100 (CET)
- Subject: Re: [PATCH] Fix undefined label problem after crossjumping (PR rtl-optimization/64536)
- Authentication-results: sourceware.org; auth=none
- References: <20150109091014 dot GR1405 at tucnak dot redhat dot com> <alpine dot LSU dot 2 dot 11 dot 1501091031470 dot 12482 at zhemvz dot fhfr dot qr> <20150109095458 dot GS1405 at tucnak dot redhat dot com> <alpine dot LSU dot 2 dot 11 dot 1501091111070 dot 12482 at zhemvz dot fhfr dot qr> <20150109110014 dot GV1405 at tucnak dot redhat dot com> <alpine dot LSU dot 2 dot 11 dot 1501091158120 dot 12482 at zhemvz dot fhfr dot qr> <20150109135308 dot GZ1405 at tucnak dot redhat dot com> <alpine dot LSU dot 2 dot 11 dot 1501091508160 dot 12482 at zhemvz dot fhfr dot qr> <20150109142831 dot GA1405 at tucnak dot redhat dot com>
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.