diff options
author | steven <steven@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-11-25 00:05:33 +0000 |
---|---|---|
committer | steven <steven@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-11-25 00:05:33 +0000 |
commit | e447c404ff4a082421f00affc2fe227c1d3057cf (patch) | |
tree | f4fbe4062386c89b20d55c06b1f8c3a1bd2e796f | |
parent | 187f1591f6c8d55829858d59d6aebcad12cc26ee (diff) | |
download | gcc-e447c404ff4a082421f00affc2fe227c1d3057cf.tar.gz |
gcc/
* doc/tm.texi.in (DELAY_SLOTS_FOR_EPILOGUE): Remove documentation.
(ELIGIBLE_FOR_EPILOGUE_DELAY): Likewise.
* doc/tm.texi: Regenerate.
* reorg.c (fill_simple_delay_slots): Remove code conditional on
DELAY_SLOTS_FOR_EPILOGUE being defined.
(make_return_insns, dbr_schedule): Likewise.
* system.h (DELAY_SLOTS_FOR_EPILOGUE): Poison.
(ELIGIBLE_FOR_EPILOGUE_DELAY): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193787 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 11 | ||||
-rw-r--r-- | gcc/doc/tm.texi | 35 | ||||
-rw-r--r-- | gcc/doc/tm.texi.in | 35 | ||||
-rw-r--r-- | gcc/reorg.c | 112 | ||||
-rw-r--r-- | gcc/system.h | 3 |
5 files changed, 13 insertions, 183 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3bcbf790ed4..fcfb0749ff0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +2012-11-25 Steven Bosscher <steven@gcc.gnu.org> + + * doc/tm.texi.in (DELAY_SLOTS_FOR_EPILOGUE): Remove documentation. + (ELIGIBLE_FOR_EPILOGUE_DELAY): Likewise. + * doc/tm.texi: Regenerate. + * reorg.c (fill_simple_delay_slots): Remove code conditional on + DELAY_SLOTS_FOR_EPILOGUE being defined. + (make_return_insns, dbr_schedule): Likewise. + * system.h (DELAY_SLOTS_FOR_EPILOGUE): Poison. + (ELIGIBLE_FOR_EPILOGUE_DELAY): Likewise. + 2012-11-24 Jack Howarth <howarth@bromo.med.uc.edu> * config/darwin.h (LINK_COMMAND_SPEC_A): Deal with -fsanitize=address. diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi index eeb3f083a9b..ef47b1434a1 100644 --- a/gcc/doc/tm.texi +++ b/gcc/doc/tm.texi @@ -4849,41 +4849,6 @@ used by the exception handling mechanism, and so should be considered live on entry to an exception edge. @end defmac -@defmac DELAY_SLOTS_FOR_EPILOGUE -Define this macro if the function epilogue contains delay slots to which -instructions from the rest of the function can be ``moved''. The -definition should be a C expression whose value is an integer -representing the number of delay slots there. -@end defmac - -@defmac ELIGIBLE_FOR_EPILOGUE_DELAY (@var{insn}, @var{n}) -A C expression that returns 1 if @var{insn} can be placed in delay -slot number @var{n} of the epilogue. - -The argument @var{n} is an integer which identifies the delay slot now -being considered (since different slots may have different rules of -eligibility). It is never negative and is always less than the number -of epilogue delay slots (what @code{DELAY_SLOTS_FOR_EPILOGUE} returns). -If you reject a particular insn for a given delay slot, in principle, it -may be reconsidered for a subsequent delay slot. Also, other insns may -(at least in principle) be considered for the so far unfilled delay -slot. - -@findex epilogue_delay_list -@findex crtl->epilogue_delay_list -@findex final_scan_insn -The insns accepted to fill the epilogue delay slots are put in an RTL -list made with @code{insn_list} objects, stored in -@code{crtl->epilogue_delay_list}. The insn for the first -delay slot comes first in the list. Your definition of the macro -@code{TARGET_ASM_FUNCTION_EPILOGUE} should fill the delay slots by -outputting the insns in this list, usually by calling -@code{final_scan_insn}. - -You need not define this macro if you did not define -@code{DELAY_SLOTS_FOR_EPILOGUE}. -@end defmac - @deftypefn {Target Hook} void TARGET_ASM_OUTPUT_MI_THUNK (FILE *@var{file}, tree @var{thunk_fndecl}, HOST_WIDE_INT @var{delta}, HOST_WIDE_INT @var{vcall_offset}, tree @var{function}) A function that outputs the assembler code for a thunk function, used to implement C++ virtual function calls with multiple diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in index 2c9cb1045e7..f3945a46d3d 100644 --- a/gcc/doc/tm.texi.in +++ b/gcc/doc/tm.texi.in @@ -4778,41 +4778,6 @@ used by the exception handling mechanism, and so should be considered live on entry to an exception edge. @end defmac -@defmac DELAY_SLOTS_FOR_EPILOGUE -Define this macro if the function epilogue contains delay slots to which -instructions from the rest of the function can be ``moved''. The -definition should be a C expression whose value is an integer -representing the number of delay slots there. -@end defmac - -@defmac ELIGIBLE_FOR_EPILOGUE_DELAY (@var{insn}, @var{n}) -A C expression that returns 1 if @var{insn} can be placed in delay -slot number @var{n} of the epilogue. - -The argument @var{n} is an integer which identifies the delay slot now -being considered (since different slots may have different rules of -eligibility). It is never negative and is always less than the number -of epilogue delay slots (what @code{DELAY_SLOTS_FOR_EPILOGUE} returns). -If you reject a particular insn for a given delay slot, in principle, it -may be reconsidered for a subsequent delay slot. Also, other insns may -(at least in principle) be considered for the so far unfilled delay -slot. - -@findex epilogue_delay_list -@findex crtl->epilogue_delay_list -@findex final_scan_insn -The insns accepted to fill the epilogue delay slots are put in an RTL -list made with @code{insn_list} objects, stored in -@code{crtl->epilogue_delay_list}. The insn for the first -delay slot comes first in the list. Your definition of the macro -@code{TARGET_ASM_FUNCTION_EPILOGUE} should fill the delay slots by -outputting the insns in this list, usually by calling -@code{final_scan_insn}. - -You need not define this macro if you did not define -@code{DELAY_SLOTS_FOR_EPILOGUE}. -@end defmac - @hook TARGET_ASM_OUTPUT_MI_THUNK A function that outputs the assembler code for a thunk function, used to implement C++ virtual function calls with multiple diff --git a/gcc/reorg.c b/gcc/reorg.c index 90ea42ea471..d4c2deb0e9e 100644 --- a/gcc/reorg.c +++ b/gcc/reorg.c @@ -2407,94 +2407,6 @@ fill_simple_delay_slots (int non_jumps_p) note_delay_statistics (slots_filled, 0); } - -#ifdef DELAY_SLOTS_FOR_EPILOGUE - /* See if the epilogue needs any delay slots. Try to fill them if so. - The only thing we can do is scan backwards from the end of the - function. If we did this in a previous pass, it is incorrect to do it - again. */ - if (crtl->epilogue_delay_list) - return; - - slots_to_fill = DELAY_SLOTS_FOR_EPILOGUE; - if (slots_to_fill == 0) - return; - - slots_filled = 0; - CLEAR_RESOURCE (&set); - - /* The frame pointer and stack pointer are needed at the beginning of - the epilogue, so instructions setting them can not be put in the - epilogue delay slot. However, everything else needed at function - end is safe, so we don't want to use end_of_function_needs here. */ - CLEAR_RESOURCE (&needed); - if (frame_pointer_needed) - { - SET_HARD_REG_BIT (needed.regs, FRAME_POINTER_REGNUM); -#if HARD_FRAME_POINTER_REGNUM != FRAME_POINTER_REGNUM - SET_HARD_REG_BIT (needed.regs, HARD_FRAME_POINTER_REGNUM); -#endif - if (! EXIT_IGNORE_STACK - || crtl->sp_is_unchanging) - SET_HARD_REG_BIT (needed.regs, STACK_POINTER_REGNUM); - } - else - SET_HARD_REG_BIT (needed.regs, STACK_POINTER_REGNUM); - -#ifdef EPILOGUE_USES - for (i = 0; i < FIRST_PSEUDO_REGISTER; i++) - { - if (EPILOGUE_USES (i)) - SET_HARD_REG_BIT (needed.regs, i); - } -#endif - - for (trial = get_last_insn (); ! stop_search_p (trial, 1); - trial = PREV_INSN (trial)) - { - if (NOTE_P (trial)) - continue; - pat = PATTERN (trial); - if (GET_CODE (pat) == USE || GET_CODE (pat) == CLOBBER) - continue; - - if (! insn_references_resource_p (trial, &set, true) - && ! insn_sets_resource_p (trial, &needed, true) - && ! insn_sets_resource_p (trial, &set, true) -#ifdef HAVE_cc0 - /* Don't want to mess with cc0 here. */ - && ! reg_mentioned_p (cc0_rtx, pat) -#endif - && ! can_throw_internal (trial)) - { - trial = try_split (pat, trial, 1); - if (ELIGIBLE_FOR_EPILOGUE_DELAY (trial, slots_filled)) - { - /* Here as well we are searching backward, so put the - insns we find on the head of the list. */ - - crtl->epilogue_delay_list - = gen_rtx_INSN_LIST (VOIDmode, trial, - crtl->epilogue_delay_list); - mark_end_of_function_resources (trial, true); - update_block (trial, trial); - delete_related_insns (trial); - - /* Clear deleted bit so final.c will output the insn. */ - INSN_DELETED_P (trial) = 0; - - if (slots_to_fill == ++slots_filled) - break; - continue; - } - } - - mark_set_resources (trial, &set, 0, MARK_SRC_DEST_CALL); - mark_referenced_resources (trial, &needed, true); - } - - note_delay_statistics (slots_filled, 0); -#endif } /* Follow any unconditional jump at LABEL, for the purpose of redirecting JUMP; @@ -3731,17 +3643,6 @@ make_return_insns (rtx first) rtx real_simple_return_label = function_simple_return_label; int slots, i; -#ifdef DELAY_SLOTS_FOR_EPILOGUE - /* If a previous pass filled delay slots in the epilogue, things get a - bit more complicated, as those filler insns would generally (without - data flow analysis) have to be executed after any existing branch - delay slot filler insns. It is also unknown whether such a - transformation would actually be profitable. Note that the existing - code only cares for branches with (some) filled delay slots. */ - if (crtl->epilogue_delay_list != NULL) - return; -#endif - /* See if there is a RETURN insn in the function other than the one we made for END_OF_FUNCTION_LABEL. If so, set up anything we can't change into a RETURN to jump to it. */ @@ -4080,19 +3981,6 @@ dbr_schedule (rtx first) free_resource_info (); free (uid_to_ruid); -#ifdef DELAY_SLOTS_FOR_EPILOGUE - /* SPARC assembler, for instance, emit warning when debug info is output - into the delay slot. */ - { - rtx link; - - for (link = crtl->epilogue_delay_list; - link; - link = XEXP (link, 1)) - INSN_LOCATION (XEXP (link, 0)) = 0; - } - -#endif crtl->dbr_scheduled_p = true; } #endif /* DELAY_SLOTS */ diff --git a/gcc/system.h b/gcc/system.h index 2907e6c3f9f..54d86acc360 100644 --- a/gcc/system.h +++ b/gcc/system.h @@ -902,7 +902,8 @@ extern void fancy_abort (const char *, int, const char *) ATTRIBUTE_NORETURN; UNALIGNED_LONG_ASM_OP UNALIGNED_DOUBLE_INT_ASM_OP \ USE_COMMON_FOR_ONE_ONLY IFCVT_EXTRA_FIELDS IFCVT_INIT_EXTRA_FIELDS \ CASE_USE_BIT_TESTS FIXUNS_TRUNC_LIKE_FIX_TRUNC \ - GO_IF_MODE_DEPENDENT_ADDRESS + GO_IF_MODE_DEPENDENT_ADDRESS DELAY_SLOTS_FOR_EPILOGUE \ + ELIGIBLE_FOR_EPILOGUE_DELAY /* Hooks that are no longer used. */ #pragma GCC poison LANG_HOOKS_FUNCTION_MARK LANG_HOOKS_FUNCTION_FREE \ |