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>
* expmed.c (init_expmed): Generate shifted constant once.
......
......@@ -1601,8 +1601,8 @@ insert (x, classp, hash, mode)
elt->is_const = (CONSTANT_P (x)
/* GNU C++ takes advantage of this for `this'
(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)
|| FIXED_BASE_PLUS_P (x));
......
......@@ -2286,11 +2286,11 @@ copy_most_rtx (orig, may_share)
copy = rtx_alloc (code);
PUT_MODE (copy, GET_MODE (orig));
copy->in_struct = orig->in_struct;
copy->volatil = orig->volatil;
copy->unchanging = orig->unchanging;
copy->integrated = orig->integrated;
copy->frame_related = orig->frame_related;
RTX_FLAG (copy, in_struct) = RTX_FLAG (orig, in_struct);
RTX_FLAG (copy, volatil) = RTX_FLAG (orig, volatil);
RTX_FLAG (copy, unchanging) = RTX_FLAG (orig, unchanging);
RTX_FLAG (copy, integrated) = RTX_FLAG (orig, integrated);
RTX_FLAG (copy, frame_related) = RTX_FLAG (orig, frame_related);
format_ptr = GET_RTX_FORMAT (GET_CODE (copy));
......@@ -2423,7 +2423,7 @@ copy_rtx_if_shared (orig)
/* This rtx may not be shared. If it has already been seen,
replace it with a copy of itself. */
if (x->used)
if (RTX_FLAG (x, used))
{
rtx copy;
......@@ -2434,7 +2434,7 @@ copy_rtx_if_shared (orig)
x = copy;
copied = 1;
}
x->used = 1;
RTX_FLAG (x, used) = 1;
/* Now scan the subexpressions recursively.
We can store any replaced subexpressions directly into X
......@@ -2513,7 +2513,7 @@ reset_used_flags (x)
break;
}
x->used = 0;
RTX_FLAG (x, used) = 0;
format_ptr = GET_RTX_FORMAT (code);
for (i = 0; i < GET_RTX_LENGTH (code); i++)
......@@ -4467,8 +4467,8 @@ gen_sequence ()
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. */
if (len == 1
&& ! RTX_FRAME_RELATED_P (first_insn)
&& GET_CODE (first_insn) == INSN
&& ! RTX_FRAME_RELATED_P (first_insn)
/* Don't throw away any reg notes. */
&& REG_NOTES (first_insn) == 0)
return PATTERN (first_insn);
......@@ -4592,14 +4592,14 @@ copy_insn_1 (orig)
/* We do not copy the USED flag, which is used as a mark bit during
walks over the RTL. */
copy->used = 0;
RTX_FLAG (copy, used) = 0;
/* We do not copy JUMP, CALL, or FRAME_RELATED for INSNs. */
if (GET_RTX_CLASS (code) == 'i')
{
copy->jump = 0;
copy->call = 0;
copy->frame_related = 0;
RTX_FLAG (copy, jump) = 0;
RTX_FLAG (copy, call) = 0;
RTX_FLAG (copy, frame_related) = 0;
}
format_ptr = GET_RTX_FORMAT (GET_CODE (copy));
......
......@@ -2761,7 +2761,7 @@ alter_subreg (xp)
ORIGINAL_REGNO (x) = ORIGINAL_REGNO (y);
/* This field has a different meaning for REGs and SUBREGs. Make
sure to clear it! */
x->used = 0;
RTX_FLAG (x, used) = 0;
}
else
abort ();
......
......@@ -2209,7 +2209,7 @@ copy_rtx_and_substitute (orig, map, for_lhs)
if (map->orig_asm_operands_vector == ASM_OPERANDS_INPUT_VEC (orig))
{
copy = rtx_alloc (ASM_OPERANDS);
copy->volatil = orig->volatil;
RTX_FLAG (copy, volatil) = RTX_FLAG (orig, volatil);
PUT_MODE (copy, GET_MODE (orig));
ASM_OPERANDS_TEMPLATE (copy) = ASM_OPERANDS_TEMPLATE (orig);
ASM_OPERANDS_OUTPUT_CONSTRAINT (copy)
......@@ -2328,9 +2328,9 @@ copy_rtx_and_substitute (orig, map, for_lhs)
copy = rtx_alloc (code);
PUT_MODE (copy, mode);
copy->in_struct = orig->in_struct;
copy->volatil = orig->volatil;
copy->unchanging = orig->unchanging;
RTX_FLAG (copy, in_struct) = RTX_FLAG (orig, in_struct);
RTX_FLAG (copy, volatil) = RTX_FLAG (orig, volatil);
RTX_FLAG (copy, unchanging) = RTX_FLAG (orig, unchanging);
format_ptr = GET_RTX_FORMAT (GET_CODE (copy));
......
......@@ -154,25 +154,25 @@ print_rtx (in_rtx)
if (! flag_simple)
{
if (in_rtx->in_struct)
if (RTX_FLAG (in_rtx, in_struct))
fputs ("/s", outfile);
if (in_rtx->volatil)
if (RTX_FLAG (in_rtx, volatil))
fputs ("/v", outfile);
if (in_rtx->unchanging)
if (RTX_FLAG (in_rtx, unchanging))
fputs ("/u", outfile);
if (in_rtx->integrated)
if (RTX_FLAG (in_rtx, integrated))
fputs ("/i", outfile);
if (in_rtx->frame_related)
if (RTX_FLAG (in_rtx, frame_related))
fputs ("/f", outfile);
if (in_rtx->jump)
if (RTX_FLAG (in_rtx, jump))
fputs ("/j", outfile);
if (in_rtx->call)
if (RTX_FLAG (in_rtx, call))
fputs ("/c", outfile);
if (GET_MODE (in_rtx) != VOIDmode)
......
......@@ -211,6 +211,7 @@ struct rtx_def
#define GET_MODE(RTX) ((enum machine_mode) (RTX)->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_UNCHANGING_P(RTX) ((RTX)->unchanging)
#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