diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2014-10-22 12:02:11 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2014-10-22 12:02:11 +0000 |
commit | 9840b2fa87cc9657dca2b63dc66d37f94d2c9cb8 (patch) | |
tree | 69a28087e5d6c8f66821aa2540f8d19983b792eb /gcc/recog.h | |
parent | 75d25a02fcd6d85c314700b5b2e03743f1bec04a (diff) | |
download | gcc-9840b2fa87cc9657dca2b63dc66d37f94d2c9cb8.zip gcc-9840b2fa87cc9657dca2b63dc66d37f94d2c9cb8.tar.gz gcc-9840b2fa87cc9657dca2b63dc66d37f94d2c9cb8.tar.bz2 |
md.texi: Document "preferred_for_size" and "preferred_for_speed" attributes.
gcc/
* doc/md.texi: Document "preferred_for_size" and "preferred_for_speed"
attributes.
* genattr.c (main): Handle "preferred_for_size" and
"preferred_for_speed" in the same way as "enabled".
* recog.h (bool_attr): New enum.
(target_recog): Replace x_enabled_alternatives with x_bool_attr_masks.
(get_preferred_alternatives, check_bool_attrs): Declare.
* recog.c (have_bool_attr, get_bool_attr, get_bool_attr_mask_uncached)
(get_bool_attr_mask, get_preferred_alternatives, check_bool_attrs):
New functions.
(get_enabled_alternatives): Use get_bool_attr_mask.
* ira-costs.c (record_reg_classes): Use get_preferred_alternatives
instead of recog_data.enabled_alternatives.
* ira.c (ira_setup_alts): Likewise.
* postreload.c (reload_cse_simplify_operands): Likewise.
* config/i386/i386.c (ix86_legitimate_combined_insn): Likewise.
* ira-lives.c (preferred_alternatives): New variable.
(process_bb_node_lives): Set it.
(check_and_make_def_conflict, make_early_clobber_and_input_conflicts)
(single_reg_class, ira_implicitly_set_insn_hard_regs): Use it instead
of recog_data.enabled_alternatives.
* lra-int.h (lra_insn_recog_data): Replace enabled_alternatives
to preferred_alternatives.
* lra-constraints.c (process_alt_operands): Update accordingly.
* lra.c (lra_set_insn_recog_data): Likewise.
(lra_update_insn_recog_data): Assert check_bool_attrs.
From-SVN: r216554
Diffstat (limited to 'gcc/recog.h')
-rw-r--r-- | gcc/recog.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/gcc/recog.h b/gcc/recog.h index d3619cb..fe8e0e8 100644 --- a/gcc/recog.h +++ b/gcc/recog.h @@ -389,10 +389,19 @@ extern int peep2_current_count; #ifndef GENERATOR_FILE #include "insn-codes.h" +/* An enum of boolean attributes that may only depend on the current + subtarget, not on things like operands or compiler phase. */ +enum bool_attr { + BA_ENABLED, + BA_PREFERRED_FOR_SPEED, + BA_PREFERRED_FOR_SIZE, + BA_LAST = BA_PREFERRED_FOR_SIZE +}; + /* Target-dependent globals. */ struct target_recog { bool x_initialized; - alternative_mask x_enabled_alternatives[LAST_INSN_CODE]; + alternative_mask x_bool_attr_masks[LAST_INSN_CODE][BA_LAST + 1]; operand_alternative *x_op_alt[LAST_INSN_CODE]; }; @@ -404,6 +413,8 @@ extern struct target_recog *this_target_recog; #endif alternative_mask get_enabled_alternatives (rtx_insn *); +alternative_mask get_preferred_alternatives (rtx_insn *); +bool check_bool_attrs (rtx_insn *); void recog_init (); #endif |