On 05/12/14 02:02, Zhenqiang Chen wrote:
Hi,
According to Steven and Jeff's comments, the patch cleans up most
shrink-wrapping codes from function.c to new added shrink-wrap.c.
Changes include:
(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.
* try_shrink_wrapping
* get_unconverted_simple_return
* convert_to_simple_return
(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?
Thanks!
-Zhenqiang
ChangeLog:
2014-05-12 Zhenqiang Chen <zhenqiang.c...@linaro.org>
* Makefile.in: add shrink-wrap.o.
* function.c (requires_stack_frame_p, next_block_for_reg,
move_insn_for_shrink_wrap, prepare_shrink_wrap,
dup_block_and_redirect): Move to shrink-wrap.c
(thread_prologue_and_epilogue_insns): Extract three code segments to
shrink-wrap.c
* function.h (emit_return_into_block, active_insn_between,
convert_jumps_to_returns, emit_return_for_exit,prepare_shrink_wrap
dup_block_and_redirect, try_shrink_wrapping, convert_to_simple_return,
get_unconverted_simple_return): New prototypes.
* shrink-wrap.c: New file.
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).
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.
Thanks,
Jeff