diff options
author | Joern Rennecke <joern.rennecke@embecosm.com> | 2012-11-05 15:18:10 +0000 |
---|---|---|
committer | Joern Rennecke <joern.rennecke@embecosm.com> | 2012-11-05 15:18:10 +0000 |
commit | be9be3875855bf22662f9fcd1777a9af9a0489a6 (patch) | |
tree | 8e0a8f071bd365a15434d0e94b091fe7d57014a7 /gcc/recog.c | |
parent | 8f22ce5616795dc7537e26454841a4281459a12c (diff) |
* doc/md.texi (Defining Attributes): Document that we are defining
HAVE_ATTR_name macors as 1 for defined attributes, and as 0
for undefined special attributes.
* final.c (asm_insn_count, align_fuzz): Always define.
(insn_current_reference_address): Likewise.
(init_insn_lengths): Use if (HAVE_ATTR_length) instead of
#ifdef HAVE_ATTR_length.
(get_attr_length_1, shorten_branches, final): Likewise.
(final_scan_insn, output_asm_name): Likewise.
* genattr.c (gen_attr): Define HAVE_ATTR_name macros for
defined attributes as 1.
Remove ancient get_attr_alternative compatibility code.
For special purpose attributes not provided, define HAVE_ATTR_name
as 0.
In case no length attribute is given, provide stub definitions
for insn_*_length* functions, and also include insn-addr.h.
In case no enabled attribute is given, provide stub definition.
* genattrtab.c (write_length_unit_log): Always write a definition.
* hooks.c (hook_int_rtx_1, hook_int_rtx_unreachable): New functions.
* hooks.h (hook_int_rtx_1, hook_int_rtx_unreachable): Declare.
* lra-int.h (struct lra_insn_recog_data): Make member
alternative_enabled_p unconditional.
* lra.c (free_insn_recog_data): Use if (HAVE_ATTR_length) instead of
#ifdef HAVE_ATTR_length.
(lra_set_insn_recog_data): Likewise. Make initialization of
alternative_enabled_p unconditional.
(lra_update_insn_recog_data): Use #if instead of #ifdef for
HAVE_ATTR_enabled.
* recog.c [!HAVE_ATTR_enabled] (get_attr_enabled): Don't define.
(extract_insn): Check HAVE_ATTR_enabled.
(gate_handle_split_before_regstack): Use #if instead of
#if defined for HAVE_ATTR_length.
git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@193168 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/recog.c')
-rw-r--r-- | gcc/recog.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/gcc/recog.c b/gcc/recog.c index 751133f4a65..8206f5eace9 100644 --- a/gcc/recog.c +++ b/gcc/recog.c @@ -57,14 +57,6 @@ along with GCC; see the file COPYING3. If not see #endif #endif -#ifndef HAVE_ATTR_enabled -static inline bool -get_attr_enabled (rtx insn ATTRIBUTE_UNUSED) -{ - return true; -} -#endif - static void validate_replace_rtx_1 (rtx *, rtx, rtx, rtx, bool); static void validate_replace_src_1 (rtx *, void *); static rtx split_insn (rtx); @@ -2172,7 +2164,8 @@ extract_insn (rtx insn) for (i = 0; i < recog_data.n_alternatives; i++) { which_alternative = i; - recog_data.alternative_enabled_p[i] = get_attr_enabled (insn); + recog_data.alternative_enabled_p[i] + = HAVE_ATTR_enabled ? get_attr_enabled (insn) : 0; } } @@ -3819,7 +3812,7 @@ struct rtl_opt_pass pass_split_after_reload = static bool gate_handle_split_before_regstack (void) { -#if defined (HAVE_ATTR_length) && defined (STACK_REGS) +#if HAVE_ATTR_length && defined (STACK_REGS) /* If flow2 creates new instructions which need splitting and scheduling after reload is not done, they might not be split until final which doesn't allow splitting @@ -3905,7 +3898,7 @@ struct rtl_opt_pass pass_split_before_sched2 = static bool gate_do_final_split (void) { -#if defined (HAVE_ATTR_length) && !defined (STACK_REGS) +#if HAVE_ATTR_length && !defined (STACK_REGS) return 1; #else return 0; |