From c8a6f15498c274ee708b862f61d8358a2d4c11ea Mon Sep 17 00:00:00 2001 From: Daniel Berlin Date: Tue, 15 Jun 2004 18:37:34 +0000 Subject: [PATCH] tree-flow-inline.h (stmt_ann): Remove use of is_essa_node. 2004-06-15 Daniel Berlin * tree-flow-inline.h (stmt_ann): Remove use of is_essa_node. * tree-dfa.c (create_stmt_ann): Ditto. * tree-pretty-print.c (dump_generic_node): Remove E* node handling. * tree-inline.c (estimate_num_insns_1): Ditto. * tree.c (tree_size): Ditto. (make_node_stat): Ditto. (tree_node_structure): Ditto. (ephi_node_elt_check_failed): Remove. (is_essa_node): Ditto. * tree.def (EPHI_NODE): Ditto. (EEXIT_NODE): Ditto. (EUSE_NODE): Ditto. (EKILL_NODE): Ditto. * tree.h (EREF_NODE_CHECK): Remove. (EPHI_NODE_ELT_CHECK): Ditto. (struct tree_eref_common): Ditto. (struct tree_euse_node): Ditto. (struct ephi_arg_d): Ditto. (struct tree_ephi_node): Ditto. (ephi_node_elt_check_failed): Remove prototype. (is_essa_node): Ditto. (enum tree_node_structure_enum): Remove TS_E*_NODE. (union tree_node): Remove E*_NODE uses. From-SVN: r83196 --- gcc/ChangeLog | 26 ++++++ gcc/tree-dfa.c | 2 +- gcc/tree-flow-inline.h | 2 +- gcc/tree-inline.c | 4 - gcc/tree-pretty-print.c | 80 ----------------- gcc/tree.c | 37 +------- gcc/tree.def | 13 --- gcc/tree.h | 186 ---------------------------------------- 8 files changed, 30 insertions(+), 320 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c03a523a253..a9cfaae1eae 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,29 @@ +2004-06-15 Daniel Berlin + + * tree-flow-inline.h (stmt_ann): Remove use of is_essa_node. + * tree-dfa.c (create_stmt_ann): Ditto. + * tree-pretty-print.c (dump_generic_node): Remove E* node handling. + * tree-inline.c (estimate_num_insns_1): Ditto. + * tree.c (tree_size): Ditto. + (make_node_stat): Ditto. + (tree_node_structure): Ditto. + (ephi_node_elt_check_failed): Remove. + (is_essa_node): Ditto. + * tree.def (EPHI_NODE): Ditto. + (EEXIT_NODE): Ditto. + (EUSE_NODE): Ditto. + (EKILL_NODE): Ditto. + * tree.h (EREF_NODE_CHECK): Remove. + (EPHI_NODE_ELT_CHECK): Ditto. + (struct tree_eref_common): Ditto. + (struct tree_euse_node): Ditto. + (struct ephi_arg_d): Ditto. + (struct tree_ephi_node): Ditto. + (ephi_node_elt_check_failed): Remove prototype. + (is_essa_node): Ditto. + (enum tree_node_structure_enum): Remove TS_E*_NODE. + (union tree_node): Remove E*_NODE uses. + 2004-06-15 Jerry Quinn * alias.c (record_set, record_base_value, canon_rtx, get_addr, diff --git a/gcc/tree-dfa.c b/gcc/tree-dfa.c index 869f6da78bc..a2b8a698af2 100644 --- a/gcc/tree-dfa.c +++ b/gcc/tree-dfa.c @@ -443,7 +443,7 @@ create_stmt_ann (tree t) stmt_ann_t ann; #if defined ENABLE_CHECKING - if ((!is_gimple_stmt (t) && !is_essa_node (t)) + if ((!is_gimple_stmt (t)) || (t->common.ann && t->common.ann->common.type != STMT_ANN)) abort (); diff --git a/gcc/tree-flow-inline.h b/gcc/tree-flow-inline.h index c8cf12c1eff..5ecaa1d3832 100644 --- a/gcc/tree-flow-inline.h +++ b/gcc/tree-flow-inline.h @@ -91,7 +91,7 @@ static inline stmt_ann_t stmt_ann (tree t) { #if defined ENABLE_CHECKING - if (!is_gimple_stmt (t) && !is_essa_node (t)) + if (!is_gimple_stmt (t)) abort (); #endif diff --git a/gcc/tree-inline.c b/gcc/tree-inline.c index 39dde67dea8..7d8b0db8ea9 100644 --- a/gcc/tree-inline.c +++ b/gcc/tree-inline.c @@ -1238,10 +1238,6 @@ estimate_num_insns_1 (tree *tp, int *walk_subtrees, void *data) case RETURN_EXPR: case EXIT_EXPR: case LOOP_EXPR: - case EUSE_NODE: - case EKILL_NODE: - case EPHI_NODE: - case EEXIT_NODE: case PHI_NODE: break; /* We don't account constants for now. Assume that the cost is amortized diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c index b550fc9870d..691a9202c5f 100644 --- a/gcc/tree-pretty-print.c +++ b/gcc/tree-pretty-print.c @@ -1358,86 +1358,6 @@ dump_generic_node (pretty_printer *buffer, tree node, int spc, int flags, pp_character (buffer, '>'); break; - case EPHI_NODE: - { - int i; - - pp_string (buffer, " EPHI ("); - dump_generic_node (buffer, EREF_NAME (node), spc, flags, false); - pp_string (buffer, ") "); - pp_character (buffer, '['); - pp_string (buffer, " class:"); - pp_decimal_int (buffer, EREF_CLASS (node)); - if (EPHI_DOWNSAFE (node)) - pp_string (buffer, " downsafe"); - if (EPHI_CANT_BE_AVAIL (node)) - pp_string (buffer, " cant_be_avail"); - if (EPHI_STOPS (node)) - pp_string (buffer, " stops"); - pp_string (buffer, " bb:"); - pp_decimal_int (buffer, bb_for_stmt (node)->index); - pp_character (buffer, ']'); - if (! (flags & TDF_SLIM)) - { - pp_string (buffer, " <"); - for (i = 0; i < EPHI_NUM_ARGS (node); i++) - { - if (EPHI_ARG_DEF (node, i)) - { - newline_and_indent (buffer, spc + 2); - pp_string (buffer, " edge "); - pp_decimal_int (buffer, EPHI_ARG_EDGE (node, i)->src->index); - pp_string (buffer, "->"); - pp_decimal_int (buffer, EPHI_ARG_EDGE (node, i)->dest->index); - pp_string (buffer, " [ "); - if (EPHI_ARG_HAS_REAL_USE (node, i)) - pp_string (buffer, " real use"); - if (EPHI_ARG_INJURED (node, i)) - pp_string (buffer, " injured"); - if (EPHI_ARG_STOPS (node, i)) - pp_string (buffer, " stops"); - pp_string (buffer, " ] "); - pp_string (buffer, " defined by:"); - dump_generic_node (buffer, EPHI_ARG_DEF (node, i), - spc + 4, flags | TDF_SLIM, false); - } - } - } - pp_string (buffer, " >"); - } - break; - case EEXIT_NODE: - case EKILL_NODE: - if (TREE_CODE (node) == EEXIT_NODE) - pp_string (buffer, "EEXIT ("); - else if (TREE_CODE (node) == EKILL_NODE) - pp_string (buffer, "EKILL ("); - dump_generic_node (buffer, EREF_NAME (node), spc, flags, false); - pp_string (buffer, ") "); - pp_character (buffer, '['); - pp_string (buffer, "class:"); - pp_decimal_int (buffer, EREF_CLASS (node)); - pp_string (buffer, " bb:"); - pp_decimal_int (buffer, bb_for_stmt (node)->index); - pp_character (buffer, ']'); - break; - case EUSE_NODE: - pp_string (buffer, " EUSE ("); - dump_generic_node (buffer, EREF_NAME (node), spc, flags, false); - - pp_string (buffer, ") "); - pp_character (buffer, '['); - pp_string (buffer, "class:"); - pp_decimal_int (buffer, EREF_CLASS (node)); - pp_string (buffer, " phiop:"); - pp_decimal_int (buffer, EUSE_PHIOP (node)); - pp_string (buffer, " bb:"); - pp_decimal_int (buffer, bb_for_stmt (node)->index); - if (EUSE_LVAL (node)) - pp_string (buffer, " left-occurrence"); - pp_string (buffer, " ]"); - - break; case PHI_NODE: { int i; diff --git a/gcc/tree.c b/gcc/tree.c index b3301b3c442..bb7ed19272c 100644 --- a/gcc/tree.c +++ b/gcc/tree.c @@ -192,15 +192,7 @@ tree_size (tree node) + (PHI_ARG_CAPACITY (node) - 1) * sizeof (struct phi_arg_d)); - case EPHI_NODE: return (sizeof (struct tree_ephi_node) - + (EPHI_ARG_CAPACITY (node) - 1) * - sizeof (struct ephi_arg_d)); - case SSA_NAME: return sizeof (struct tree_ssa_name); - case EUSE_NODE: return sizeof (struct tree_euse_node); - - case EKILL_NODE: - case EEXIT_NODE: return sizeof (struct tree_eref_common); case STATEMENT_LIST: return sizeof (struct tree_statement_list); case BLOCK: return sizeof (struct tree_block); @@ -231,9 +223,9 @@ make_node_stat (enum tree_code code MEM_STAT_DECL) #endif struct tree_common ttmp; - /* We can't allocate a TREE_VEC, PHI_NODE, EPHI_NODE or STRING_CST + /* We can't allocate a TREE_VEC, PHI_NODE, or STRING_CST without knowing how many elements it will have. */ - if (code == TREE_VEC || code == PHI_NODE || code == EPHI_NODE) + if (code == TREE_VEC || code == PHI_NODE) abort (); TREE_SET_CODE ((tree)&ttmp, code); @@ -1501,10 +1493,6 @@ tree_node_structure (tree t) case TREE_LIST: return TS_LIST; case TREE_VEC: return TS_VEC; case PHI_NODE: return TS_PHI_NODE; - case EPHI_NODE: return TS_EPHI_NODE; - case EUSE_NODE: return TS_EUSE_NODE; - case EKILL_NODE: return TS_EREF_NODE; - case EEXIT_NODE: return TS_EREF_NODE; case SSA_NAME: return TS_SSA_NAME; case PLACEHOLDER_EXPR: return TS_COMMON; case STATEMENT_LIST: return TS_STATEMENT_LIST; @@ -5174,18 +5162,6 @@ tree_vec_elt_check_failed (int idx, int len, const char *file, int line, idx + 1, len, function, trim_filename (file), line); } -/* Similar to above, except that the check is for the bounds of a EPHI_NODE's - (dynamically sized) vector. */ - -void -ephi_node_elt_check_failed (int idx, int len, const char *file, int line, - const char *function) -{ - internal_error - ("tree check: accessed elt %d of ephi_node with %d elts in %s, at %s:%d", - idx + 1, len, function, trim_filename (file), line); -} - /* Similar to above, except that the check is for the bounds of a PHI_NODE's (dynamically sized) vector. */ @@ -5556,15 +5532,6 @@ build_empty_stmt (void) return build1 (NOP_EXPR, void_type_node, size_zero_node); } -bool -is_essa_node (tree t) -{ - if (TREE_CODE (t) == EPHI_NODE || TREE_CODE (t) == EUSE_NODE - || TREE_CODE (t) == EEXIT_NODE || TREE_CODE (t) == EKILL_NODE) - return true; - return false; -} - /* Return true if T (assumed to be a DECL) must be assigned a memory location. */ diff --git a/gcc/tree.def b/gcc/tree.def index b43950d824e..5c40c8a163f 100644 --- a/gcc/tree.def +++ b/gcc/tree.def @@ -866,19 +866,6 @@ DEFTREECODE (ASM_EXPR, "asm_expr", 's', 4) nodes to implement SSA versioning. */ DEFTREECODE (SSA_NAME, "ssa_name", 'x', 0) -/* Expression SSA real and phi operand occurrence node. */ -DEFTREECODE (EUSE_NODE, "euse_node", 'x', 0) - -/* Expression SSA kill occurrence node. */ -DEFTREECODE (EKILL_NODE, "ekill_node", 'x', 0) - -/* Expression SSA expression PHI. Like a regular SSA PHI operator, - but for expressions*/ -DEFTREECODE (EPHI_NODE, "ephi_node", 'x', 0) - -/* Expression SSA exit occurrence node. */ -DEFTREECODE (EEXIT_NODE, "eexit_node", 'x', 0) - /* SSA PHI operator. PHI_RESULT is the new SSA_NAME node created by the PHI node. PHI_ARG_LENGTH is the number of arguments. PHI_ARG_ELT returns the Ith tuple from the diff --git a/gcc/tree.h b/gcc/tree.h index de012fb6434..61808953274 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -406,16 +406,6 @@ struct tree_common GTY(()) __FUNCTION__); \ __t; }) -#define EREF_NODE_CHECK(t) __extension__ \ -({ const tree __t = t; \ - if (TREE_CODE (__t) != EPHI_NODE \ - && TREE_CODE (__t) != EKILL_NODE \ - && TREE_CODE (__t) != EUSE_NODE \ - && TREE_CODE (__t) != EEXIT_NODE) \ - tree_check_failed (__t, TREE_CODE (t), \ - __FILE__, __LINE__, __FUNCTION__); \ - __t; }) - #define TREE_VEC_ELT_CHECK(T, I) __extension__ \ (*({const tree __t = (T); \ const int __i = (I); \ @@ -427,17 +417,6 @@ struct tree_common GTY(()) __FILE__, __LINE__, __FUNCTION__); \ &__t->vec.a[__i]; })) -#define EPHI_NODE_ELT_CHECK(t, i) __extension__ \ -(*({const tree __t = t; \ - const int __i = (i); \ - if (TREE_CODE (__t) != EPHI_NODE) \ - tree_check_failed (__t, EPHI_NODE, \ - __FILE__, __LINE__, __FUNCTION__); \ - if (__i < 0 || __i >= __t->ephi.capacity) \ - ephi_node_elt_check_failed (__i, __t->ephi.num_args, \ - __FILE__, __LINE__, __FUNCTION__); \ - &__t->ephi.a[__i]; })) - #define PHI_NODE_ELT_CHECK(t, i) __extension__ \ (*({const tree __t = t; \ const int __i = (i); \ @@ -506,10 +485,6 @@ extern void tree_vec_elt_check_failed (int, int, const char *, extern void phi_node_elt_check_failed (int, int, const char *, int, const char *) ATTRIBUTE_NORETURN; -extern void ephi_node_elt_check_failed (int, int, const char *, - int, const char *) - ATTRIBUTE_NORETURN; - extern void tree_operand_check_failed (int, enum tree_code, const char *, int, const char *) ATTRIBUTE_NORETURN; @@ -528,9 +503,7 @@ extern void tree_operand_check_failed (int, enum tree_code, #define TREE_OPERAND_CHECK(T, I) ((T)->exp.operands[I]) #define TREE_OPERAND_CHECK_CODE(T, CODE, I) ((T)->exp.operands[I]) #define TREE_RTL_OPERAND_CHECK(T, CODE, I) (*(rtx *) &((T)->exp.operands[I])) -#define EREF_NODE_CHECK(T) (T) #define PHI_NODE_ELT_CHECK(T, i) ((T)->phi.a[i]) -#define EPHI_NODE_ELT_CHECK(T, i) ((T)->ephi.a[i]) #endif @@ -1271,158 +1244,6 @@ struct tree_phi_node GTY(()) struct varray_head_tag; -struct tree_eref_common GTY(()) -{ - struct tree_common common; - - /* SSAPRE: ID for the EREF. Used only for sorting erefs inside a - block. */ - int id; - - /* SSAPRE: Name for the EREF. Used only for printing.*/ - tree name; - - /* SSAPRE: The statement associated with this expression reference. */ - tree stmt; - - /* SSAPRE: True if expression needs to be saved to a temporary. */ - unsigned int save:1; - - /* SSAPRE: True if expression needs to be reloaded from a temporary. */ - unsigned int reload:1; - - /* SSAPRE: Redundancy class of expression. */ - unsigned int class; - - /* SSAPRE: Processed flag 1. */ - unsigned int processed:1; - - /* SSAPRE: True if expression is injured. */ - unsigned int injured:1; - - /* SSAPRE: Temporary assigned to this reference. */ - tree temp; - -}; - -struct tree_euse_node GTY(()) -{ - struct tree_eref_common common; - - /* SSAPRE: Definition for this use. */ - tree def; - - /* SSAPRE: True if this is an EPHI operand occurrence. */ - unsigned int op_occurrence:1; - - /* SSAPRE: True if expression was inserted as a PHI operand occurrence. */ - unsigned int inserted:1; - - /* SSAPRE: True if expression occurs as a lvalue. */ - unsigned int lval:1; -}; -struct ephi_arg_d GTY(()) -{ - - /* SSAPRE: True if this phi argument is injured. */ - unsigned int injured:1; - - /* SSAPRE: True if there is a real occurrence for this phi argument. */ - unsigned int has_real_use:1; - - /* SSAPRE: True if delayed renaming is required on this phi argument. */ - unsigned int delayed_rename:1; - - /* SSAPRE: Processed 2 flag for this phi argument. */ - unsigned int processed2:1; - - /* SSAPRE: True if this operand stops forward movement. */ - unsigned int stops:1; - - /* SSAPRE: Definition of this phi operand. */ - tree def; - - /* SSAPRE: Phi predecessor for this phi operand. */ - tree pred; - - struct edge_def * GTY((skip (""))) e; -}; -struct tree_ephi_node GTY(()) -{ - struct tree_eref_common common; - - /* SSAPRE: True if PHI is downsafe. */ - unsigned int downsafe:1; - - /* SSAPRE: True if PHI is cant_be_avail. */ - unsigned int cant_be_avail:1; - - /* SSAPRE: True if PHI is dead. */ - unsigned int dead:1; - - /* SSAPRE: True if PHI is pointless or identical to some value. */ - unsigned int identity:1; - - /* SSAPRE: True if replacing occurrence known for ESSA minimization. */ - unsigned int rep_occur_known:1; - - /* SSAPRE: True if PHI is pointless, but is also injured. */ - unsigned int ident_injured:1; - - /* SSAPRE: True if this PHI stops forward movement. */ - unsigned int stops:1; - - /* SSAPRE: If PHI's replacing occurrence is known, this is it. */ - tree identical_to; - - /* SSAPRE: Uses of this ephi. */ - struct varray_head_tag *uses; - - int num_args; - int capacity; - struct ephi_arg_d GTY ((length ("((tree)&%h)->ephi.capacity"))) a[1]; - -}; -/* In both EPHI's and EUSES */ -#define EREF_PROCESSED(NODE) EREF_NODE_CHECK (NODE)->eref.processed -#define EREF_ID(NODE) EREF_NODE_CHECK (NODE)->eref.id -#define EREF_NAME(NODE) EREF_NODE_CHECK (NODE)->eref.name -#define EREF_STMT(NODE) EREF_NODE_CHECK (NODE)->eref.stmt -#define EREF_RELOAD(NODE) EREF_NODE_CHECK (NODE)->eref.reload -#define EREF_SAVE(NODE) EREF_NODE_CHECK (NODE)->eref.save -#define EREF_CLASS(NODE) EREF_NODE_CHECK (NODE)->eref.class -#define EREF_INJURED(NODE) EREF_NODE_CHECK (NODE)->eref.injured -#define EREF_TEMP(NODE) EREF_NODE_CHECK (NODE)->eref.temp - -/* In a EUSE_NODE node. */ -#define EUSE_DEF(NODE) EUSE_NODE_CHECK (NODE)->euse.def -#define EUSE_PHIOP(NODE) EUSE_NODE_CHECK (NODE)->euse.op_occurrence -#define EUSE_INSERTED(NODE) EUSE_NODE_CHECK (NODE)->euse.inserted -#define EUSE_LVAL(NODE) EUSE_NODE_CHECK (NODE)->euse.lval - -/* In a EPHI_NODE node. */ -#define EPHI_NUM_ARGS(NODE) EPHI_NODE_CHECK (NODE)->ephi.num_args -#define EPHI_ARG_CAPACITY(NODE) EPHI_NODE_CHECK (NODE)->ephi.capacity -#define EPHI_ARG_ELT(NODE, I) EPHI_NODE_ELT_CHECK (NODE, I) -#define EPHI_ARG_EDGE(NODE, I) EPHI_NODE_ELT_CHECK (NODE, I).e -#define EPHI_ARG_PRED(NODE, I) EPHI_NODE_ELT_CHECK (NODE, I).pred -#define EPHI_ARG_DEF(NODE, I) EPHI_NODE_ELT_CHECK (NODE, I).def -#define EPHI_ARG_INJURED(NODE, I) EPHI_NODE_ELT_CHECK (NODE, I).injured -#define EPHI_ARG_DELAYED_RENAME(NODE, I) EPHI_NODE_ELT_CHECK (NODE, I).delayed_rename -#define EPHI_ARG_HAS_REAL_USE(NODE, I) EPHI_NODE_ELT_CHECK (NODE, I).has_real_use -#define EPHI_ARG_STOPS(NODE, I) EPHI_NODE_ELT_CHECK (NODE, I).stops -#define EPHI_ARG_PROCESSED2(NODE, I) EPHI_NODE_ELT_CHECK (NODE, I).processed2 -#define EPHI_IDENTITY(NODE) EPHI_NODE_CHECK (NODE)->ephi.identity -#define EPHI_IDENT_INJURED(NODE) EPHI_NODE_CHECK (NODE)->ephi.ident_injured - -#define EPHI_REP_OCCUR_KNOWN(NODE) EPHI_NODE_CHECK (NODE)->ephi.rep_occur_known -#define EPHI_IDENTICAL_TO(NODE) EPHI_NODE_CHECK (NODE)->ephi.identical_to -#define EPHI_DOWNSAFE(NODE) EPHI_NODE_CHECK (NODE)->ephi.downsafe -#define EPHI_CANT_BE_AVAIL(NODE) EPHI_NODE_CHECK (NODE)->ephi.cant_be_avail -#define EPHI_DEAD(NODE) EPHI_NODE_CHECK (NODE)->ephi.dead -#define EPHI_USES(NODE) EPHI_NODE_CHECK (NODE)->ephi.uses -#define EPHI_STOPS(NODE) EPHI_NODE_CHECK (NODE)->ephi.stops - /* In a BLOCK node. */ #define BLOCK_VARS(NODE) (BLOCK_CHECK (NODE)->block.vars) #define BLOCK_SUBBLOCKS(NODE) (BLOCK_CHECK (NODE)->block.subblocks) @@ -2421,9 +2242,6 @@ enum tree_node_structure_enum { TS_EXP, TS_SSA_NAME, TS_PHI_NODE, - TS_EPHI_NODE, - TS_EUSE_NODE, - TS_EREF_NODE, TS_BLOCK, TS_STATEMENT_LIST, LAST_TS_ENUM @@ -2450,9 +2268,6 @@ union tree_node GTY ((ptr_alias (union lang_tree_node), struct tree_exp GTY ((tag ("TS_EXP"))) exp; struct tree_ssa_name GTY ((tag ("TS_SSA_NAME"))) ssa_name; struct tree_phi_node GTY ((tag ("TS_PHI_NODE"))) phi; - struct tree_eref_common GTY ((tag ("TS_EREF_NODE"))) eref; - struct tree_ephi_node GTY ((tag ("TS_EPHI_NODE"))) ephi; - struct tree_euse_node GTY ((tag ("TS_EUSE_NODE"))) euse; struct tree_block GTY ((tag ("TS_BLOCK"))) block; struct tree_statement_list GTY ((tag ("TS_STATEMENT_LIST"))) stmt_list; }; @@ -3410,7 +3225,6 @@ extern tree get_callee_fndecl (tree); extern void change_decl_assembler_name (tree, tree); extern int type_num_arguments (tree); extern tree lhd_unsave_expr_now (tree); -extern bool is_essa_node (tree); extern bool associative_tree_code (enum tree_code); extern bool commutative_tree_code (enum tree_code); -- 2.30.2