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/genattr.c | |
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/genattr.c')
-rw-r--r-- | gcc/genattr.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/gcc/genattr.c b/gcc/genattr.c index 699590e..8c45979 100644 --- a/gcc/genattr.c +++ b/gcc/genattr.c @@ -338,7 +338,9 @@ main (int argc, char **argv) } /* Special-purpose attributes should be tested with if, not #ifdef. */ - const char * const special_attrs[] = { "length", "enabled", 0 }; + const char * const special_attrs[] = { "length", "enabled", + "preferred_for_size", + "preferred_for_speed", 0 }; for (const char * const *p = special_attrs; *p; p++) { printf ("#ifndef HAVE_ATTR_%s\n" @@ -355,9 +357,15 @@ main (int argc, char **argv) "#define insn_current_length hook_int_rtx_insn_unreachable\n" "#include \"insn-addr.h\"\n" "#endif\n" - "#if !HAVE_ATTR_enabled\n" "extern int hook_int_rtx_1 (rtx);\n" + "#if !HAVE_ATTR_enabled\n" "#define get_attr_enabled hook_int_rtx_1\n" + "#endif\n" + "#if !HAVE_ATTR_preferred_for_size\n" + "#define get_attr_preferred_for_size hook_int_rtx_1\n" + "#endif\n" + "#if !HAVE_ATTR_preferred_for_speed\n" + "#define get_attr_preferred_for_speed hook_int_rtx_1\n" "#endif\n"); /* Output flag masks for use by reorg. |