This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 1/3] function: Do the CLEANUP_EXPENSIVE after shrink-wrapping, not before
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Segher Boessenkool <segher at kernel dot crashing dot org>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 18 May 2016 00:34:01 +0200
- Subject: Re: [PATCH 1/3] function: Do the CLEANUP_EXPENSIVE after shrink-wrapping, not before
- Authentication-results: sourceware.org; auth=none
- References: <213485283eede9da12b217737d95fc8f5c4be442 dot 1463428211 dot git dot segher at kernel dot crashing dot org> <20160517091758 dot GC18363 at gate dot crashing dot org> <20160517222254 dot GA5146 at gate dot crashing dot org>
> I built cross-compilers for 30 targets, and built Linux with that.
> 6 of those failed for unrelated reasons. Of the 24 that do build,
> five show a few insns difference between having a cleanup_cfg before
> shrink-wrapping or not (CLEANUP_EXPENSIVE made no difference there).
> These targets are s390, blackfin, m68k, mn10300, nios2.
Interesting, thanks for experimenting.
> It turns out that prepare_shrink_wrap *does* care about block structure:
> namely, it only moves insns from the "head" block to a successor. It
> then makes a difference when the cleanup_cfg can merge two successor blocks
> (say, the first is a forwarder block). This happens quite seldomly.
>
> So, shall I put a cleanup_cfg back before shrink-wrapping?
Yes, I'd only swap CLEANUP_EXPENSIVE with 0, i.e. leave the calls themselves
and add a comment on the first one saying that this helps shrink-wrapping too.
--
Eric Botcazou