On 05/16/2016 07:09 PM, Segher Boessenkool wrote:
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.

Tested like the previous two patches; is this okay for trunk?


Segher


2016-05-16  Segher Boessenkool  <seg...@kernel.crashing.org>

        * 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.
For some reason I found this patch awful to walk through. In retrospect, it might have been better break this down further. Not because it's conceptually difficult to follow, but because the diffs themselves are difficult to read.

I kept slicing out hunks when I could pair up the original code to its new functional equivalent and hunks which were just "fluff" and kept iterating until there was nothing left that seemed unreasonable.

OK for the trunk, but please watch closely for any fallout.

jeff

Reply via email to