Commit 0864034e by Zack Weinberg

tree.h (TREE_CST_RTL, [...]): Delete.

	* tree.h (TREE_CST_RTL, CST_OR_CONSTRUCTOR_CHECK): Delete.
	(struct tree_int_cst, struct tree_real_cst, struct tree_string,
	struct tree_complex, struct tree_vector): Remove RTL field.
	(CONSTRUCTOR_ELTS): Use elt 0.
	* tree.def (CONSTRUCTOR): Delete first of its two operands.
	* varasm.c (output_constant_def): Remove early exit if
	TREE_CST_RTL is set.  Don't set TREE_CST_RTL.
	(decode_addr_const): Don't mention TREE_CST_RTL in comment.
	* target.h (select_section): Don't mention TREE_CST_RTL in comment.
	* doc/tm.texi (encode_section_info): Don't talk about TREE_CST_RTL.

ada:
	* utils.c (convert): No need to clear TREE_CST_RTL.

From-SVN: r66182
parent 9661b15f
2003-04-28 Zack Weinberg <zack@codesourcery.com>
* tree.h (TREE_CST_RTL, CST_OR_CONSTRUCTOR_CHECK): Delete.
(struct tree_int_cst, struct tree_real_cst, struct tree_string,
struct tree_complex, struct tree_vector): Remove RTL field.
(CONSTRUCTOR_ELTS): Use elt 0.
* tree.def (CONSTRUCTOR): Delete first of its two operands.
* varasm.c (output_constant_def): Remove early exit if
TREE_CST_RTL is set. Don't set TREE_CST_RTL.
(decode_addr_const): Don't mention TREE_CST_RTL in comment.
* target.h (select_section): Don't mention TREE_CST_RTL in comment.
* doc/tm.texi (encode_section_info): Don't talk about TREE_CST_RTL.
2003-04-28 Jakub Jelinek <jakub@redhat.com> 2003-04-28 Jakub Jelinek <jakub@redhat.com>
* c-decl.c (finish_decl): When prototype with asmspec is found * c-decl.c (finish_decl): When prototype with asmspec is found
...@@ -8,16 +21,16 @@ ...@@ -8,16 +21,16 @@
2003-04-28 Richard Henderson <rth@redhat.com> 2003-04-28 Richard Henderson <rth@redhat.com>
* config/sparc/sparc.c (print_operand): Add 's' to sign-extend. * config/sparc/sparc.c (print_operand): Add 's' to sign-extend.
* config/sparc/sparc.md (const_mulsidi3_v8plus): Fix mode of * config/sparc/sparc.md (const_mulsidi3_v8plus): Fix mode of
integral constant mult operand. integral constant mult operand.
(const_mulsidi3_sp32, const_mulsidi3_sp64): Likewise. (const_mulsidi3_sp32, const_mulsidi3_sp64): Likewise.
(const_smulsi3_highpart_v8plus): Likewise. (const_smulsi3_highpart_v8plus): Likewise.
(const_smulsi3_highpart): Likewise. (const_smulsi3_highpart): Likewise.
(const_umulsidi3_sp32): Likewise; sign-extend it in the output. (const_umulsidi3_sp32): Likewise; sign-extend it in the output.
(const_umulsidi3_sp64, const_umulsidi3_v8plus): Likewise. (const_umulsidi3_sp64, const_umulsidi3_v8plus): Likewise.
(const_umulsi3_highpart_v8plus): Likewise. (const_umulsi3_highpart_v8plus): Likewise.
(const_umulsi3_highpart): Likewise. (const_umulsi3_highpart): Likewise.
2003-04-28 David O'Brien <obrien@FreeBSD.org> 2003-04-28 David O'Brien <obrien@FreeBSD.org>
......
2003-04-28 Zack Weinberg <zack@codesourcery.com>
* utils.c (convert): No need to clear TREE_CST_RTL.
2003-04-23 Geert Bosch <bosch@gnat.com> 2003-04-23 Geert Bosch <bosch@gnat.com>
* 1aexcept.adb, 1aexcept.ads, 1ic.ads, 1ssecsta.adb, * 1aexcept.adb, 1aexcept.ads, 1ic.ads, 1ssecsta.adb,
......
...@@ -2877,18 +2877,13 @@ convert (type, expr) ...@@ -2877,18 +2877,13 @@ convert (type, expr)
case CONSTRUCTOR: case CONSTRUCTOR:
/* If we are converting a STRING_CST to another constrained array type, /* If we are converting a STRING_CST to another constrained array type,
just make a new one in the proper type. Likewise for a just make a new one in the proper type. Likewise for a
CONSTRUCTOR. But if the mode of the type is different, we must CONSTRUCTOR. */
ensure a new RTL is made for the constant. */
if (code == ecode && AGGREGATE_TYPE_P (etype) if (code == ecode && AGGREGATE_TYPE_P (etype)
&& ! (TREE_CODE (TYPE_SIZE (etype)) == INTEGER_CST && ! (TREE_CODE (TYPE_SIZE (etype)) == INTEGER_CST
&& TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST)) && TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST))
{ {
expr = copy_node (expr); expr = copy_node (expr);
TREE_TYPE (expr) = type; TREE_TYPE (expr) = type;
if (TYPE_MODE (type) != TYPE_MODE (etype))
TREE_CST_RTL (expr) = 0;
return expr; return expr;
} }
break; break;
......
...@@ -6062,8 +6062,7 @@ The hook is executed immediately after rtl has been created for ...@@ -6062,8 +6062,7 @@ The hook is executed immediately after rtl has been created for
@var{decl}, which may be a variable or function declaration or @var{decl}, which may be a variable or function declaration or
an entry in the constant pool. In either case, @var{rtl} is the an entry in the constant pool. In either case, @var{rtl} is the
rtl in question. Do @emph{not} use @code{DECL_RTL (@var{decl})} rtl in question. Do @emph{not} use @code{DECL_RTL (@var{decl})}
or @code{TREE_CST_RTL (@var{decl})} in this hook; that field may in this hook; that field may not have been initialized yet.
not have been initialized yet.
In the case of a constant, it is safe to assume that the rtl is In the case of a constant, it is safe to assume that the rtl is
a @code{mem} whose address is a @code{symbol_ref}. Most decls a @code{mem} whose address is a @code{symbol_ref}. Most decls
......
...@@ -102,10 +102,9 @@ struct gcc_target ...@@ -102,10 +102,9 @@ struct gcc_target
void (* eh_frame_section) PARAMS ((void)); void (* eh_frame_section) PARAMS ((void));
/* Select and switch to a section for EXP. It may be a DECL or a /* Select and switch to a section for EXP. It may be a DECL or a
constant for which TREE_CST_RTL is valid. RELOC is nonzero if constant. RELOC is nonzero if runtime relocations must be applied;
runtime relocations must be applied; bit 1 will be set if the bit 1 will be set if the runtime relocations require non-local
runtime relocations require non-local name resolution. ALIGN is name resolution. ALIGN is the required alignment of the data. */
the required alignment of the data. */
void (* select_section) PARAMS ((tree, int, unsigned HOST_WIDE_INT)); void (* select_section) PARAMS ((tree, int, unsigned HOST_WIDE_INT));
/* Select and switch to a section for X with MODE. ALIGN is /* Select and switch to a section for X with MODE. ALIGN is
......
...@@ -387,10 +387,8 @@ DEFTREECODE (VTABLE_REF, "vtable_ref", 'r', 3) ...@@ -387,10 +387,8 @@ DEFTREECODE (VTABLE_REF, "vtable_ref", 'r', 3)
/* Constructor: return an aggregate value made from specified components. /* Constructor: return an aggregate value made from specified components.
In C, this is used only for structure and array initializers. In C, this is used only for structure and array initializers.
Also used for SET_TYPE in Chill (and potentially Pascal). Also used for SET_TYPE in Chill (and potentially Pascal).
The first "operand" is really a pointer to the RTL, The operand is a list of component values made out of a chain of
for constant constructors only. TREE_LIST nodes.
The second operand is a list of component values
made out of a chain of TREE_LIST nodes.
For ARRAY_TYPE: For ARRAY_TYPE:
The TREE_PURPOSE of each node is the corresponding index. The TREE_PURPOSE of each node is the corresponding index.
...@@ -406,7 +404,7 @@ DEFTREECODE (VTABLE_REF, "vtable_ref", 'r', 3) ...@@ -406,7 +404,7 @@ DEFTREECODE (VTABLE_REF, "vtable_ref", 'r', 3)
The TREE_VALUE specifies a value (index) in the set that is true. The TREE_VALUE specifies a value (index) in the set that is true.
If TREE_PURPOSE is non-NULL, it specifies the lower limit of a If TREE_PURPOSE is non-NULL, it specifies the lower limit of a
range of true values. Elements not listed are false (not in the set). */ range of true values. Elements not listed are false (not in the set). */
DEFTREECODE (CONSTRUCTOR, "constructor", 'e', 2) DEFTREECODE (CONSTRUCTOR, "constructor", 'e', 1)
/* The expression types are mostly straightforward, with the fourth argument /* The expression types are mostly straightforward, with the fourth argument
of DEFTREECODE saying how many operands there are. of DEFTREECODE saying how many operands there are.
......
...@@ -295,13 +295,6 @@ struct tree_common GTY(()) ...@@ -295,13 +295,6 @@ struct tree_common GTY(())
__t; }) __t; })
/* These checks have to be special cased. */ /* These checks have to be special cased. */
#define CST_OR_CONSTRUCTOR_CHECK(t) __extension__ \
({ const tree __t = (t); \
enum tree_code const __c = TREE_CODE(__t); \
if (__c != CONSTRUCTOR && TREE_CODE_CLASS(__c) != 'c') \
tree_check_failed (__t, CONSTRUCTOR, __FILE__, __LINE__, \
__FUNCTION__); \
__t; })
#define EXPR_CHECK(t) __extension__ \ #define EXPR_CHECK(t) __extension__ \
({ const tree __t = (t); \ ({ const tree __t = (t); \
char const __c = TREE_CODE_CLASS(TREE_CODE(__t)); \ char const __c = TREE_CODE_CLASS(TREE_CODE(__t)); \
...@@ -748,8 +741,6 @@ extern void tree_operand_check_failed PARAMS ((int, enum tree_code, ...@@ -748,8 +741,6 @@ extern void tree_operand_check_failed PARAMS ((int, enum tree_code,
struct tree_int_cst GTY(()) struct tree_int_cst GTY(())
{ {
struct tree_common common; struct tree_common common;
rtx rtl; /* acts as link to register transfer language
(rtl) info */
/* A sub-struct is necessary here because the function `const_hash' /* A sub-struct is necessary here because the function `const_hash'
wants to scan both words as a unit and taking the address of the wants to scan both words as a unit and taking the address of the
sub-struct yields the properly inclusive bounded pointer. */ sub-struct yields the properly inclusive bounded pointer. */
...@@ -759,12 +750,6 @@ struct tree_int_cst GTY(()) ...@@ -759,12 +750,6 @@ struct tree_int_cst GTY(())
} int_cst; } int_cst;
}; };
/* In REAL_CST, STRING_CST, COMPLEX_CST, VECTOR_CST nodes, and
CONSTRUCTOR nodes, and generally in all kinds of constants that
could be given labels (rather than being immediate). */
#define TREE_CST_RTL(NODE) (CST_OR_CONSTRUCTOR_CHECK (NODE)->real_cst.rtl)
/* In a REAL_CST node. struct real_value is an opaque entity, with /* In a REAL_CST node. struct real_value is an opaque entity, with
manipulators defined in real.h. We don't want tree.h depending on manipulators defined in real.h. We don't want tree.h depending on
real.h and transitively on tm.h. */ real.h and transitively on tm.h. */
...@@ -776,7 +761,6 @@ struct real_value; ...@@ -776,7 +761,6 @@ struct real_value;
struct tree_real_cst GTY(()) struct tree_real_cst GTY(())
{ {
struct tree_common common; struct tree_common common;
rtx rtl; /* acts as link to register transfer language (rtl) info */
struct real_value * real_cst_ptr; struct real_value * real_cst_ptr;
}; };
...@@ -787,7 +771,6 @@ struct tree_real_cst GTY(()) ...@@ -787,7 +771,6 @@ struct tree_real_cst GTY(())
struct tree_string GTY(()) struct tree_string GTY(())
{ {
struct tree_common common; struct tree_common common;
rtx rtl; /* acts as link to register transfer language (rtl) info */
int length; int length;
const char *pointer; const char *pointer;
}; };
...@@ -799,7 +782,6 @@ struct tree_string GTY(()) ...@@ -799,7 +782,6 @@ struct tree_string GTY(())
struct tree_complex GTY(()) struct tree_complex GTY(())
{ {
struct tree_common common; struct tree_common common;
rtx rtl; /* acts as link to register transfer language (rtl) info */
tree real; tree real;
tree imag; tree imag;
}; };
...@@ -810,7 +792,6 @@ struct tree_complex GTY(()) ...@@ -810,7 +792,6 @@ struct tree_complex GTY(())
struct tree_vector GTY(()) struct tree_vector GTY(())
{ {
struct tree_common common; struct tree_common common;
rtx rtl;
tree elements; tree elements;
}; };
...@@ -883,7 +864,7 @@ struct tree_vec GTY(()) ...@@ -883,7 +864,7 @@ struct tree_vec GTY(())
TREE_RTL_OPERAND_CHECK (NODE, WITH_CLEANUP_EXPR, 2) TREE_RTL_OPERAND_CHECK (NODE, WITH_CLEANUP_EXPR, 2)
/* In a CONSTRUCTOR node. */ /* In a CONSTRUCTOR node. */
#define CONSTRUCTOR_ELTS(NODE) TREE_OPERAND_CHECK_CODE (NODE, CONSTRUCTOR, 1) #define CONSTRUCTOR_ELTS(NODE) TREE_OPERAND_CHECK_CODE (NODE, CONSTRUCTOR, 0)
/* In ordinary expression nodes. */ /* In ordinary expression nodes. */
#define TREE_OPERAND(NODE, I) TREE_OPERAND_CHECK (NODE, I) #define TREE_OPERAND(NODE, I) TREE_OPERAND_CHECK (NODE, I)
......
...@@ -2093,8 +2093,6 @@ decode_addr_const (exp, value) ...@@ -2093,8 +2093,6 @@ decode_addr_const (exp, value)
case COMPLEX_CST: case COMPLEX_CST:
case CONSTRUCTOR: case CONSTRUCTOR:
case INTEGER_CST: case INTEGER_CST:
/* This constant should have been output already, but we can't simply
use TREE_CST_RTL since INTEGER_CST doesn't have one. */
x = output_constant_def (target, 1); x = output_constant_def (target, 1);
break; break;
...@@ -2554,7 +2552,6 @@ build_constant_desc (exp) ...@@ -2554,7 +2552,6 @@ build_constant_desc (exp)
If DEFER is nonzero, the output of string constants can be deferred If DEFER is nonzero, the output of string constants can be deferred
and output only if referenced in the function after all optimizations. and output only if referenced in the function after all optimizations.
The TREE_CST_RTL of EXP is set up to point to that rtx.
The const_hash_table records which constants already have label strings. */ The const_hash_table records which constants already have label strings. */
rtx rtx
...@@ -2565,12 +2562,6 @@ output_constant_def (exp, defer) ...@@ -2565,12 +2562,6 @@ output_constant_def (exp, defer)
int hash; int hash;
struct constant_descriptor_tree *desc; struct constant_descriptor_tree *desc;
/* We can't just use the saved RTL if this is a deferred string constant
and we are not to defer anymore. */
if (TREE_CST_RTL (exp)
&& (defer || !STRING_POOL_ADDRESS_P (XEXP (TREE_CST_RTL (exp), 0))))
return TREE_CST_RTL (exp);
/* Compute hash code of EXP. Search the descriptors for that hash code /* Compute hash code of EXP. Search the descriptors for that hash code
to see if any of them describes EXP. If yes, the descriptor records to see if any of them describes EXP. If yes, the descriptor records
the label number already assigned. */ the label number already assigned. */
...@@ -2597,7 +2588,6 @@ output_constant_def (exp, defer) ...@@ -2597,7 +2588,6 @@ output_constant_def (exp, defer)
maybe_output_constant_def_contents (exp, desc->rtl, 0); maybe_output_constant_def_contents (exp, desc->rtl, 0);
} }
TREE_CST_RTL (exp) = desc->rtl;
return desc->rtl; return desc->rtl;
} }
......
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