Commit 2adc7f12 by Janis Johnson Committed by Janis Johnson

rtl.h (RTX_FLAG): New macro.

	* rtl.h (RTX_FLAG): New macro.
	* emit-rtl.c (copy_most_rtx): Use macros to access rtx flags.
	* final.c (alter_subreg): Use macro to access rtx flag.
	* integrate.c (copy_rtx_and_substitute): Use new access macro.
	* print-rtl.c (print_rtx): Use new access macro.

	* cse.c (insert): Check rtx code before accessing flag.

	* genattrtab.c (ATTR_IND_SIMPLIFIED_P, ATTR_CURR_SIMPLIFIED_P,
	ATTR_PERMANENT_P, ATTR_EQ_ATTR_P): New.
	(attr_hash_add_string, attr_rtx_1, attr_copy_rtx, check_attr_test,
	convert_const_symbol_ref, make_canonical, make_alternative_compare,
	evaluate_eq_attr, attr_rtx_cost, simplify_test_exp_in_temp,
	simplify_test_exp, optimize_attrs, simplify_by_exploding,
	find_and_mark_used_attributes, unmark_used_attributes,
	add_values_to_cover, simplify_with_current_value,
	simplify_with_current_value_aux, clear_struct_flag, walk_attr_value,
	copy_rtx_unchanging, main): Use new access macros.

From-SVN: r52645
parent b7c89afe
2002-04-22 Janis Johnson <janis187@us.ibm.com>
* rtl.h (RTX_FLAG): New macro.
* emit-rtl.c (copy_most_rtx): Use macros to access rtx flags.
* final.c (alter_subreg): Use macro to access rtx flag.
* integrate.c (copy_rtx_and_substitute): Use new access macro.
* print-rtl.c (print_rtx): Use new access macro.
* cse.c (insert): Check rtx code before accessing flag.
* genattrtab.c (ATTR_IND_SIMPLIFIED_P, ATTR_CURR_SIMPLIFIED_P,
ATTR_PERMANENT_P, ATTR_EQ_ATTR_P): New.
(attr_hash_add_string, attr_rtx_1, attr_copy_rtx, check_attr_test,
convert_const_symbol_ref, make_canonical, make_alternative_compare,
evaluate_eq_attr, attr_rtx_cost, simplify_test_exp_in_temp,
simplify_test_exp, optimize_attrs, simplify_by_exploding,
find_and_mark_used_attributes, unmark_used_attributes,
add_values_to_cover, simplify_with_current_value,
simplify_with_current_value_aux, clear_struct_flag, walk_attr_value,
copy_rtx_unchanging, main): Use new access macros.
2002-04-22 Tom Rix <trix@redhat.com> 2002-04-22 Tom Rix <trix@redhat.com>
* expmed.c (init_expmed): Generate shifted constant once. * expmed.c (init_expmed): Generate shifted constant once.
......
...@@ -1601,8 +1601,8 @@ insert (x, classp, hash, mode) ...@@ -1601,8 +1601,8 @@ insert (x, classp, hash, mode)
elt->is_const = (CONSTANT_P (x) elt->is_const = (CONSTANT_P (x)
/* GNU C++ takes advantage of this for `this' /* GNU C++ takes advantage of this for `this'
(and other const values). */ (and other const values). */
|| (RTX_UNCHANGING_P (x) || (GET_CODE (x) == REG
&& GET_CODE (x) == REG && RTX_UNCHANGING_P (x)
&& REGNO (x) >= FIRST_PSEUDO_REGISTER) && REGNO (x) >= FIRST_PSEUDO_REGISTER)
|| FIXED_BASE_PLUS_P (x)); || FIXED_BASE_PLUS_P (x));
......
...@@ -2286,11 +2286,11 @@ copy_most_rtx (orig, may_share) ...@@ -2286,11 +2286,11 @@ copy_most_rtx (orig, may_share)
copy = rtx_alloc (code); copy = rtx_alloc (code);
PUT_MODE (copy, GET_MODE (orig)); PUT_MODE (copy, GET_MODE (orig));
copy->in_struct = orig->in_struct; RTX_FLAG (copy, in_struct) = RTX_FLAG (orig, in_struct);
copy->volatil = orig->volatil; RTX_FLAG (copy, volatil) = RTX_FLAG (orig, volatil);
copy->unchanging = orig->unchanging; RTX_FLAG (copy, unchanging) = RTX_FLAG (orig, unchanging);
copy->integrated = orig->integrated; RTX_FLAG (copy, integrated) = RTX_FLAG (orig, integrated);
copy->frame_related = orig->frame_related; RTX_FLAG (copy, frame_related) = RTX_FLAG (orig, frame_related);
format_ptr = GET_RTX_FORMAT (GET_CODE (copy)); format_ptr = GET_RTX_FORMAT (GET_CODE (copy));
...@@ -2423,7 +2423,7 @@ copy_rtx_if_shared (orig) ...@@ -2423,7 +2423,7 @@ copy_rtx_if_shared (orig)
/* This rtx may not be shared. If it has already been seen, /* This rtx may not be shared. If it has already been seen,
replace it with a copy of itself. */ replace it with a copy of itself. */
if (x->used) if (RTX_FLAG (x, used))
{ {
rtx copy; rtx copy;
...@@ -2434,7 +2434,7 @@ copy_rtx_if_shared (orig) ...@@ -2434,7 +2434,7 @@ copy_rtx_if_shared (orig)
x = copy; x = copy;
copied = 1; copied = 1;
} }
x->used = 1; RTX_FLAG (x, used) = 1;
/* Now scan the subexpressions recursively. /* Now scan the subexpressions recursively.
We can store any replaced subexpressions directly into X We can store any replaced subexpressions directly into X
...@@ -2513,7 +2513,7 @@ reset_used_flags (x) ...@@ -2513,7 +2513,7 @@ reset_used_flags (x)
break; break;
} }
x->used = 0; RTX_FLAG (x, used) = 0;
format_ptr = GET_RTX_FORMAT (code); format_ptr = GET_RTX_FORMAT (code);
for (i = 0; i < GET_RTX_LENGTH (code); i++) for (i = 0; i < GET_RTX_LENGTH (code); i++)
...@@ -4467,8 +4467,8 @@ gen_sequence () ...@@ -4467,8 +4467,8 @@ gen_sequence ()
We only return the pattern of an insn if its code is INSN and it We only return the pattern of an insn if its code is INSN and it
has no notes. This ensures that no information gets lost. */ has no notes. This ensures that no information gets lost. */
if (len == 1 if (len == 1
&& ! RTX_FRAME_RELATED_P (first_insn)
&& GET_CODE (first_insn) == INSN && GET_CODE (first_insn) == INSN
&& ! RTX_FRAME_RELATED_P (first_insn)
/* Don't throw away any reg notes. */ /* Don't throw away any reg notes. */
&& REG_NOTES (first_insn) == 0) && REG_NOTES (first_insn) == 0)
return PATTERN (first_insn); return PATTERN (first_insn);
...@@ -4592,14 +4592,14 @@ copy_insn_1 (orig) ...@@ -4592,14 +4592,14 @@ copy_insn_1 (orig)
/* We do not copy the USED flag, which is used as a mark bit during /* We do not copy the USED flag, which is used as a mark bit during
walks over the RTL. */ walks over the RTL. */
copy->used = 0; RTX_FLAG (copy, used) = 0;
/* We do not copy JUMP, CALL, or FRAME_RELATED for INSNs. */ /* We do not copy JUMP, CALL, or FRAME_RELATED for INSNs. */
if (GET_RTX_CLASS (code) == 'i') if (GET_RTX_CLASS (code) == 'i')
{ {
copy->jump = 0; RTX_FLAG (copy, jump) = 0;
copy->call = 0; RTX_FLAG (copy, call) = 0;
copy->frame_related = 0; RTX_FLAG (copy, frame_related) = 0;
} }
format_ptr = GET_RTX_FORMAT (GET_CODE (copy)); format_ptr = GET_RTX_FORMAT (GET_CODE (copy));
......
...@@ -2761,7 +2761,7 @@ alter_subreg (xp) ...@@ -2761,7 +2761,7 @@ alter_subreg (xp)
ORIGINAL_REGNO (x) = ORIGINAL_REGNO (y); ORIGINAL_REGNO (x) = ORIGINAL_REGNO (y);
/* This field has a different meaning for REGs and SUBREGs. Make /* This field has a different meaning for REGs and SUBREGs. Make
sure to clear it! */ sure to clear it! */
x->used = 0; RTX_FLAG (x, used) = 0;
} }
else else
abort (); abort ();
......
...@@ -2209,7 +2209,7 @@ copy_rtx_and_substitute (orig, map, for_lhs) ...@@ -2209,7 +2209,7 @@ copy_rtx_and_substitute (orig, map, for_lhs)
if (map->orig_asm_operands_vector == ASM_OPERANDS_INPUT_VEC (orig)) if (map->orig_asm_operands_vector == ASM_OPERANDS_INPUT_VEC (orig))
{ {
copy = rtx_alloc (ASM_OPERANDS); copy = rtx_alloc (ASM_OPERANDS);
copy->volatil = orig->volatil; RTX_FLAG (copy, volatil) = RTX_FLAG (orig, volatil);
PUT_MODE (copy, GET_MODE (orig)); PUT_MODE (copy, GET_MODE (orig));
ASM_OPERANDS_TEMPLATE (copy) = ASM_OPERANDS_TEMPLATE (orig); ASM_OPERANDS_TEMPLATE (copy) = ASM_OPERANDS_TEMPLATE (orig);
ASM_OPERANDS_OUTPUT_CONSTRAINT (copy) ASM_OPERANDS_OUTPUT_CONSTRAINT (copy)
...@@ -2328,9 +2328,9 @@ copy_rtx_and_substitute (orig, map, for_lhs) ...@@ -2328,9 +2328,9 @@ copy_rtx_and_substitute (orig, map, for_lhs)
copy = rtx_alloc (code); copy = rtx_alloc (code);
PUT_MODE (copy, mode); PUT_MODE (copy, mode);
copy->in_struct = orig->in_struct; RTX_FLAG (copy, in_struct) = RTX_FLAG (orig, in_struct);
copy->volatil = orig->volatil; RTX_FLAG (copy, volatil) = RTX_FLAG (orig, volatil);
copy->unchanging = orig->unchanging; RTX_FLAG (copy, unchanging) = RTX_FLAG (orig, unchanging);
format_ptr = GET_RTX_FORMAT (GET_CODE (copy)); format_ptr = GET_RTX_FORMAT (GET_CODE (copy));
......
...@@ -154,25 +154,25 @@ print_rtx (in_rtx) ...@@ -154,25 +154,25 @@ print_rtx (in_rtx)
if (! flag_simple) if (! flag_simple)
{ {
if (in_rtx->in_struct) if (RTX_FLAG (in_rtx, in_struct))
fputs ("/s", outfile); fputs ("/s", outfile);
if (in_rtx->volatil) if (RTX_FLAG (in_rtx, volatil))
fputs ("/v", outfile); fputs ("/v", outfile);
if (in_rtx->unchanging) if (RTX_FLAG (in_rtx, unchanging))
fputs ("/u", outfile); fputs ("/u", outfile);
if (in_rtx->integrated) if (RTX_FLAG (in_rtx, integrated))
fputs ("/i", outfile); fputs ("/i", outfile);
if (in_rtx->frame_related) if (RTX_FLAG (in_rtx, frame_related))
fputs ("/f", outfile); fputs ("/f", outfile);
if (in_rtx->jump) if (RTX_FLAG (in_rtx, jump))
fputs ("/j", outfile); fputs ("/j", outfile);
if (in_rtx->call) if (RTX_FLAG (in_rtx, call))
fputs ("/c", outfile); fputs ("/c", outfile);
if (GET_MODE (in_rtx) != VOIDmode) if (GET_MODE (in_rtx) != VOIDmode)
......
...@@ -211,6 +211,7 @@ struct rtx_def ...@@ -211,6 +211,7 @@ struct rtx_def
#define GET_MODE(RTX) ((enum machine_mode) (RTX)->mode) #define GET_MODE(RTX) ((enum machine_mode) (RTX)->mode)
#define PUT_MODE(RTX, MODE) ((RTX)->mode = (ENUM_BITFIELD(machine_mode)) (MODE)) #define PUT_MODE(RTX, MODE) ((RTX)->mode = (ENUM_BITFIELD(machine_mode)) (MODE))
#define RTX_FLAG(RTX,FLAG) ((RTX)->FLAG)
#define RTX_INTEGRATED_P(RTX) ((RTX)->integrated) #define RTX_INTEGRATED_P(RTX) ((RTX)->integrated)
#define RTX_UNCHANGING_P(RTX) ((RTX)->unchanging) #define RTX_UNCHANGING_P(RTX) ((RTX)->unchanging)
#define RTX_FRAME_RELATED_P(RTX) ((RTX)->frame_related) #define RTX_FRAME_RELATED_P(RTX) ((RTX)->frame_related)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment