aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-family/c-indentation.c
diff options
context:
space:
mode:
authorSegher Boessenkool <segher@kernel.crashing.org>2015-09-22 22:50:38 +0200
committerSegher Boessenkool <segher@gcc.gnu.org>2015-09-22 22:50:38 +0200
commit6c98d4995ce54ff8bec88a5b40a654007e4eb1bd (patch)
tree6c4b9f01b10be2f4390fa87e4680491acee3ba07 /gcc/c-family/c-indentation.c
parent50fa47d9167aa830a911df8f5ba4d52cec79536d (diff)
downloadgcc-6c98d4995ce54ff8bec88a5b40a654007e4eb1bd.zip
gcc-6c98d4995ce54ff8bec88a5b40a654007e4eb1bd.tar.gz
gcc-6c98d4995ce54ff8bec88a5b40a654007e4eb1bd.tar.bz2
shrink-wrap: Handle multiple predecessors of prologue
The caller of try_shrink_wrapping wants to be returned a single edge to put the prologue on. To make that work even if there are multiple edges (all pointing to the PRO block) that need the prologue, add a new block that becomes the destination of all such edges, and then jumps to PRO. In the general case, some edges to PRO will need to be redirected, and not all edges *can* be redirected. This adds a can_get_prologue function that detects such cases. This then happily can also handle the "prologue clobbers some reg that is live on the edge we want to insert it on" case. Not all EDGE_CROSSING edges can be redirected, so handle those the same as EDGE_COMPLEX edges. 2015-09-22 Segher Boessenkool <segher@kernel.crashing.org> * function.c (thread_prologue_and_epilogue_insns): Delete orig_entry_edge argument to try_shrink_wrapping. * shrink-wrap.c (can_get_prologue): New function. (can_dup_for_shrink_wrapping): Also handle EDGE_CROSSING. (try_shrink_wrapping): Delete orig_entry_edge argument. Use can_get_prologue where needed. Remove code that finds a single edge for the prologue. Remove code that tests if any reg clobbered by the prologue is live on the prologue edge. Remove code that finds the new prologue edge after duplicating blocks. Make a new prologue block and edge. * shrink-wrap.h (try_shrink_wrapping): Delete orig_entry_edge argument. From-SVN: r228022
Diffstat (limited to 'gcc/c-family/c-indentation.c')
0 files changed, 0 insertions, 0 deletions