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
This commit is contained in:
Zack Weinberg 2003-04-28 20:02:28 +00:00
parent 9661b15f95
commit 0864034eb2
8 changed files with 36 additions and 57 deletions

View file

@ -1,3 +1,16 @@
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>
* c-decl.c (finish_decl): When prototype with asmspec is found
@ -8,16 +21,16 @@
2003-04-28 Richard Henderson <rth@redhat.com>
* config/sparc/sparc.c (print_operand): Add 's' to sign-extend.
* config/sparc/sparc.md (const_mulsidi3_v8plus): Fix mode of
integral constant mult operand.
(const_mulsidi3_sp32, const_mulsidi3_sp64): Likewise.
(const_smulsi3_highpart_v8plus): Likewise.
(const_smulsi3_highpart): Likewise.
(const_umulsidi3_sp32): Likewise; sign-extend it in the output.
(const_umulsidi3_sp64, const_umulsidi3_v8plus): Likewise.
(const_umulsi3_highpart_v8plus): Likewise.
(const_umulsi3_highpart): Likewise.
* config/sparc/sparc.c (print_operand): Add 's' to sign-extend.
* config/sparc/sparc.md (const_mulsidi3_v8plus): Fix mode of
integral constant mult operand.
(const_mulsidi3_sp32, const_mulsidi3_sp64): Likewise.
(const_smulsi3_highpart_v8plus): Likewise.
(const_smulsi3_highpart): Likewise.
(const_umulsidi3_sp32): Likewise; sign-extend it in the output.
(const_umulsidi3_sp64, const_umulsidi3_v8plus): Likewise.
(const_umulsi3_highpart_v8plus): Likewise.
(const_umulsi3_highpart): Likewise.
2003-04-28 David O'Brien <obrien@FreeBSD.org>

View file

@ -1,3 +1,7 @@
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>
* 1aexcept.adb, 1aexcept.ads, 1ic.ads, 1ssecsta.adb,

View file

@ -2877,18 +2877,13 @@ convert (type, expr)
case CONSTRUCTOR:
/* If we are converting a STRING_CST to another constrained array type,
just make a new one in the proper type. Likewise for a
CONSTRUCTOR. But if the mode of the type is different, we must
ensure a new RTL is made for the constant. */
CONSTRUCTOR. */
if (code == ecode && AGGREGATE_TYPE_P (etype)
&& ! (TREE_CODE (TYPE_SIZE (etype)) == INTEGER_CST
&& TREE_CODE (TYPE_SIZE (type)) != INTEGER_CST))
{
expr = copy_node (expr);
TREE_TYPE (expr) = type;
if (TYPE_MODE (type) != TYPE_MODE (etype))
TREE_CST_RTL (expr) = 0;
return expr;
}
break;

View file

@ -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
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})}
or @code{TREE_CST_RTL (@var{decl})} in this hook; that field may
not have been initialized yet.
in this hook; that field may not have been initialized yet.
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

View file

@ -102,10 +102,9 @@ struct gcc_target
void (* eh_frame_section) PARAMS ((void));
/* 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
runtime relocations must be applied; bit 1 will be set if the
runtime relocations require non-local name resolution. ALIGN is
the required alignment of the data. */
constant. RELOC is nonzero if runtime relocations must be applied;
bit 1 will be set if the runtime relocations require non-local
name resolution. ALIGN is the required alignment of the data. */
void (* select_section) PARAMS ((tree, int, unsigned HOST_WIDE_INT));
/* Select and switch to a section for X with MODE. ALIGN is

View file

@ -387,10 +387,8 @@ DEFTREECODE (VTABLE_REF, "vtable_ref", 'r', 3)
/* Constructor: return an aggregate value made from specified components.
In C, this is used only for structure and array initializers.
Also used for SET_TYPE in Chill (and potentially Pascal).
The first "operand" is really a pointer to the RTL,
for constant constructors only.
The second operand is a list of component values
made out of a chain of TREE_LIST nodes.
The operand is a list of component values made out of a chain of
TREE_LIST nodes.
For ARRAY_TYPE:
The TREE_PURPOSE of each node is the corresponding index.
@ -406,7 +404,7 @@ DEFTREECODE (VTABLE_REF, "vtable_ref", 'r', 3)
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
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
of DEFTREECODE saying how many operands there are.

View file

@ -295,13 +295,6 @@ struct tree_common GTY(())
__t; })
/* 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__ \
({ const tree __t = (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,
struct tree_int_cst GTY(())
{
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'
wants to scan both words as a unit and taking the address of the
sub-struct yields the properly inclusive bounded pointer. */
@ -759,12 +750,6 @@ struct tree_int_cst GTY(())
} 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
manipulators defined in real.h. We don't want tree.h depending on
real.h and transitively on tm.h. */
@ -776,7 +761,6 @@ struct real_value;
struct tree_real_cst GTY(())
{
struct tree_common common;
rtx rtl; /* acts as link to register transfer language (rtl) info */
struct real_value * real_cst_ptr;
};
@ -787,7 +771,6 @@ struct tree_real_cst GTY(())
struct tree_string GTY(())
{
struct tree_common common;
rtx rtl; /* acts as link to register transfer language (rtl) info */
int length;
const char *pointer;
};
@ -799,7 +782,6 @@ struct tree_string GTY(())
struct tree_complex GTY(())
{
struct tree_common common;
rtx rtl; /* acts as link to register transfer language (rtl) info */
tree real;
tree imag;
};
@ -810,7 +792,6 @@ struct tree_complex GTY(())
struct tree_vector GTY(())
{
struct tree_common common;
rtx rtl;
tree elements;
};
@ -883,7 +864,7 @@ struct tree_vec GTY(())
TREE_RTL_OPERAND_CHECK (NODE, WITH_CLEANUP_EXPR, 2)
/* 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. */
#define TREE_OPERAND(NODE, I) TREE_OPERAND_CHECK (NODE, I)

View file

@ -2093,8 +2093,6 @@ decode_addr_const (exp, value)
case COMPLEX_CST:
case CONSTRUCTOR:
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);
break;
@ -2554,7 +2552,6 @@ build_constant_desc (exp)
If DEFER is nonzero, the output of string constants can be deferred
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. */
rtx
@ -2565,12 +2562,6 @@ output_constant_def (exp, defer)
int hash;
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
to see if any of them describes EXP. If yes, the descriptor records
the label number already assigned. */
@ -2597,7 +2588,6 @@ output_constant_def (exp, defer)
maybe_output_constant_def_contents (exp, desc->rtl, 0);
}
TREE_CST_RTL (exp) = desc->rtl;
return desc->rtl;
}