diff options
author | David Edelsohn <edelsohn@gnu.org> | 2005-06-02 14:19:18 +0000 |
---|---|---|
committer | David Edelsohn <dje@gcc.gnu.org> | 2005-06-02 10:19:18 -0400 |
commit | 9419649c017669b08911458bc16ac18e2792bc56 (patch) | |
tree | 317dc2d84774bcde6303f31746abb010d12eee52 | |
parent | 46c4495f40a3bf057d4fe74bfb473e69ce1d798b (diff) | |
download | gcc-9419649c017669b08911458bc16ac18e2792bc56.zip gcc-9419649c017669b08911458bc16ac18e2792bc56.tar.gz gcc-9419649c017669b08911458bc16ac18e2792bc56.tar.bz2 |
rs6000.c (rs6000_insn_valid_within_doloop): New.
* config/rs6000/rs6000.c (rs6000_insn_valid_within_doloop): New.
(TARGET_INSN_VALID_WITHIN_DOLOOP): Define.
From-SVN: r100493
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 21 |
2 files changed, 26 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c26763b..600266d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2005-06-02 David Edelsohn <edelsohn@gnu.org> + + * config/rs6000/rs6000.c (rs6000_insn_valid_within_doloop): New. + (TARGET_INSN_VALID_WITHIN_DOLOOP): Define. + 2005-06-02 Diego Novillo <dnovillo@redhat.com> * tree-vrp.c (has_assert_expr, maybe_add_assert_expr): Remove. diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 9f8bbd7..b82ee74 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -552,6 +552,7 @@ struct processor_costs power4_cost = { static bool rs6000_function_ok_for_sibcall (tree, tree); +static bool rs6000_insn_valid_within_doloop (rtx); static rtx rs6000_generate_compare (enum rtx_code); static void rs6000_maybe_dead (rtx); static void rs6000_emit_stack_tie (void); @@ -906,6 +907,9 @@ static const char alt_reg_names[][8] = #undef TARGET_FUNCTION_OK_FOR_SIBCALL #define TARGET_FUNCTION_OK_FOR_SIBCALL rs6000_function_ok_for_sibcall +#undef TARGET_INSN_VALID_WITHIN_DOLOOP +#define TARGET_INSN_VALID_WITHIN_DOLOOP rs6000_insn_valid_within_doloop + #undef TARGET_RTX_COSTS #define TARGET_RTX_COSTS rs6000_rtx_costs #undef TARGET_ADDRESS_COST @@ -12520,6 +12524,23 @@ rs6000_function_ok_for_sibcall (tree decl, tree exp ATTRIBUTE_UNUSED) return false; } +/* TRUE if INSN insn is valid within a low-overhead loop. + PowerPC uses the COUNT register for branch on table instructions. */ + +static bool +rs6000_insn_valid_within_doloop (rtx insn) +{ + if (CALL_P (insn)) + return false; + + if (JUMP_P (insn) + && (GET_CODE (PATTERN (insn)) == ADDR_DIFF_VEC + || GET_CODE (PATTERN (insn)) == ADDR_VEC)) + return false; + + return true; +} + static int rs6000_ra_ever_killed (void) { |