This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][PR65893] Move pass_stdarg to after pass_dce in pass_all_optimizations
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Tom de Vries <Tom_deVries at mentor dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 29 Apr 2015 11:02:51 +0200
- Subject: Re: [PATCH][PR65893] Move pass_stdarg to after pass_dce in pass_all_optimizations
- Authentication-results: sourceware.org; auth=none
- References: <55409BDD dot 8070305 at mentor dot com>
On Wed, Apr 29, 2015 at 10:52 AM, Tom de Vries <Tom_deVries@mentor.com> wrote:
> Hi,
>
> After moving the expansion of va_arg from gimplification to pass_stdarg, we
> execute less optimization passes on the expanded va_arg.
>
> For example, in PR65893 the optimized-dump code for a va_arg expansion for
> aarch64 is less optimal than it was before, because pass_tree_ifcombine is
> no longer executed for the expanded va_arg.
>
> This patch fixes the problem by moving pass_stdarg a bit earlier, to after
> pass_dce:
> ...
> NEXT_PASS (pass_vrp);
> NEXT_PASS (pass_chkp_opt);
> NEXT_PASS (pass_dce);
> + NEXT_PASS (pass_stdarg);
> NEXT_PASS (pass_call_cdce);
> NEXT_PASS (pass_cselim);
> NEXT_PASS (pass_copy_prop);
> NEXT_PASS (pass_tree_ifcombine);
> NEXT_PASS (pass_phiopt);
> NEXT_PASS (pass_tail_recursion);
> NEXT_PASS (pass_ch);
> - NEXT_PASS (pass_stdarg);
> NEXT_PASS (pass_lower_complex);
> NEXT_PASS (pass_sra);
> NEXT_PASS (pass_rename_ssa_copies);
> ...
>
> Bootstrapped and reg-tested on x86_64.
>
> OK for trunk?
Ok.
Thanks,
Richard.
> Thanks,
> - Tom