function: Restructure *logue insertion
commitd06955005d038a20d4db15dca3bf7c59b28c3c17
authorsegher <segher@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 19 May 2016 22:17:53 +0000 (19 22:17 +0000)
committersegher <segher@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 19 May 2016 22:17:53 +0000 (19 22:17 +0000)
tree925e8358e6a8300855c5228c2a225afc376e6b67
parent51d42eb1801cf2e545d245054ddb5811ae68c3f2
function: Restructure *logue insertion

This patch restructures how the prologues/epilogues are inserted.  Sibcalls
that run without prologue are now handled in shrink-wrap.c; it communicates
what is already handled by setting the EDGE_IGNORE flag.  The
try_shrink_wrapping function then doesn't need to be passed the bb_flags
anymore.

* function.c (make_epilogue_seq): Remove epilogue_end parameter.
(thread_prologue_and_epilogue_insns): Remove bb_flags.  Restructure
code.  Ignore sibcalls on EDGE_IGNORE edges.
* shrink-wrap.c (handle_simple_exit): New function.  Set EDGE_IGNORE
on edges for sibcalls that run without prologue.  The rest of the
function is combined from...
(fix_fake_fallthrough_edge): ... this, and ...
(try_shrink_wrapping): ... a part of this.  Remove the bb_with
function argument, make it a local variable.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@236491 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/function.c
gcc/shrink-wrap.c
gcc/shrink-wrap.h