This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Clean up shrink-wrapping codes
- From: Jeff Law <law at redhat dot com>
- To: Zhenqiang Chen <zhenqiang dot chen at linaro dot org>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Cc: Steven Bosscher <stevenb dot gcc at gmail dot com>
- Date: Mon, 12 May 2014 10:12:39 -0600
- Subject: Re: [PATCH] Clean up shrink-wrapping codes
- Authentication-results: sourceware.org; auth=none
- References: <CACgzC7Dr844=v7GAGiuk5NhbhXdQqamvFpFxzeBP_OX6LtEiRw at mail dot gmail dot com>
On 05/12/14 02:02, Zhenqiang Chen wrote:
I know it's a bit of a pain, but can you go ahead and create
shrink-wrap.h and put the exported interfaces from shrink-wrap.c into
there an include shrink-wrap.h in the appropriate places (.c files,
please don't include it in function.h).
According to Steven and Jeff's comments, the patch cleans up most
shrink-wrapping codes from function.c to new added shrink-wrap.c.
(1) Move functions requires_stack_frame_p, next_block_for_reg,
move_insn_for_shrink_wrap, prepare_shrink_wrap and
dup_block_and_redirect to shrink-wrap.c
(2) Extract 3 functions from function
thread_prologue_and_epilogue_insns and move them to shrink-wrap.c.
(3) Make emit_return_into_block, active_insn_between,
convert_jumps_to_returns, emit_return_for_exit, prepare_shrink_wrap
and dup_block_and_redirect global.
Bootstap and no make check regression on X86-64.
OK for trunk?
2014-05-12 Zhenqiang Chen <firstname.lastname@example.org>
* Makefile.in: add shrink-wrap.o.
* function.c (requires_stack_frame_p, next_block_for_reg,
dup_block_and_redirect): Move to shrink-wrap.c
(thread_prologue_and_epilogue_insns): Extract three code segments to
* function.h (emit_return_into_block, active_insn_between,
dup_block_and_redirect, try_shrink_wrapping, convert_to_simple_return,
get_unconverted_simple_return): New prototypes.
* shrink-wrap.c: New file.
We're in the middle of trying to clean up the contents of the internal
header files and bring some sanity to that mess. We should avoid making
more work for those working on that project.
Pre-approved with the addition of the new header file and using it in
the appropriate .c files. Please post the final version of the patch so
that it gets recorded in the archives.