Commit c9145754 by Daniel Berlin Committed by Daniel Berlin

Fix PR tree-optimization/23455 Fix PR tree-optimization/35286 Fix PR tree-optimization/35287

2008-07-05  Daniel Berlin  <dberlin@dberlin.org>
	
	Fix PR tree-optimization/23455
	Fix PR tree-optimization/35286
	Fix PR tree-optimization/35287
	* Makefile.in (OBJS-common): Remove tree-vn.o.
	tree-vn.o: Remove.
	* dbgcnt.def: Add treepre_insert debug counter.
	* gcc/tree-flow.h (add_to_value): Updated for other changes.
	(debug_value_expressions): Ditto.
	(print_value_expressions): Ditto.
	* tree-pretty-print.c (dump_generic_node): Updated for
	VALUE_HANDLE removal.
	* tree-ssa-dom.c (record_equality): Ditto.
	(cprop_operand): Ditto.
	(lookup_avail_expr): Ditto.
	* tree-ssa-threadedge.c
	(record_temporary_equivalences_from_stmts_at_dest): Ditto.
	(simplify_control_stmt_condition): Ditto.
	* tree.c (tree_code_size): Ditto.
	(tree_node_structure): Ditto.
	(iterative_hash_expr): Ditto.
	* tree.def: Ditto.
	* tree.h (VALUE_HANDLE_ID): Ditto.
	(VALUE_HANDLE_EXPR_SET): Ditto.
	(struct tree_value_handle): Ditto.
	(union tree_node): Ditto.
	* treestruct.def: Ditto.
	* tree-vn.c: Removed.
	* tree-ssa-pre.c: Rewritten entirely.
	* tree-ssa-sccvn.c (constant_to_value_id): New hashtable.
	(constant_value_ids): Ditto.
	(vn_nary_op_t): Moved to header.
	(vn_phi_t): Ditto.
	(vn_reference_op_t): Ditto
	(vn_reference_t): Ditto.
	(next_value_id): New variable.
	(VN_INFO): Add an assert.
	(vn_constant_eq): New function.
	(vn_constant_hash): Ditto.
	(get_or_alloc_constant_value_id): Ditto.
	(value_id_constant_p): Ditto.
	(vn_reference_compute_hash): De-staticify.
	(copy_reference_ops_from_ref): Don't use get_callee_fndecl.
	Disable some code with a FIXME.
	Remove VALUE_HANDLE use.
	(valueize_refs): Update opcode if it changes from ssa name to
	constant.
	(vn_reference_lookup_1): Add new argument.
	(vn_reference_lookup):  Ditto.
	(vn_reference_lookup_pieces): New function.
	(vn_reference_insert): Add return type. Modify to deal with value
	ids.
	(vn_reference_insert_pieces):  New function.
	(vn_nary_op_compute_hash): De-staticify.
	(vn_nary_op_eq): Ditto.
	(vn_nary_op_lookup_pieces): New function.
	(vn_nary_op_lookup): Add new argument.  
	(vn_nary_op_insert_pieces): New function.
	(vn_nary_op_insert): Add return type. Modify to deal with value
	ids.
	(vn_phi_insert): Ditto.
	(visit_unary_op): Update for callee changes.
	(visit_binary_op): Ditto.
	(visit_reference_op_load): Ditto.
	(visit_reference_op_store): Ditto.
	(init_scc_vn): Init next_value_id, constant_to_value_id and
	constant_value_ids. 
	(free_scc_vn): Free them.
	(set_hashtable_value_ids): New function.
	(run_scc_vn): Use it.
	(get_max_value_id): New function.
	(get_next_value_id): Ditto.
	(expressions_equal_p): Moved from tree-vn.c
	(sort_vuses): Ditto.
	(sort_vuses_heap): Ditto.
	* tree-ssa-sccvn.h: Structures moved from tree-ssa-sccvn.c (noted
	above).
	* tree.c (iterative_hash_hashval_t): Made non-static
	* tree.h (iterative_hash_hashval_t): Declare it.

From-SVN: r137631
parent 771578a0
2008-07-05 Daniel Berlin <dberlin@dberlin.org>
Fix PR tree-optimization/23455
Fix PR tree-optimization/35286
Fix PR tree-optimization/35287
* Makefile.in (OBJS-common): Remove tree-vn.o.
tree-vn.o: Remove.
* dbgcnt.def: Add treepre_insert debug counter.
* gcc/tree-flow.h (add_to_value): Updated for other changes.
(debug_value_expressions): Ditto.
(print_value_expressions): Ditto.
* tree-pretty-print.c (dump_generic_node): Updated for
VALUE_HANDLE removal.
* tree-ssa-dom.c (record_equality): Ditto.
(cprop_operand): Ditto.
(lookup_avail_expr): Ditto.
* tree-ssa-threadedge.c
(record_temporary_equivalences_from_stmts_at_dest): Ditto.
(simplify_control_stmt_condition): Ditto.
* tree.c (tree_code_size): Ditto.
(tree_node_structure): Ditto.
(iterative_hash_expr): Ditto.
* tree.def: Ditto.
* tree.h (VALUE_HANDLE_ID): Ditto.
(VALUE_HANDLE_EXPR_SET): Ditto.
(struct tree_value_handle): Ditto.
(union tree_node): Ditto.
* treestruct.def: Ditto.
* tree-vn.c: Removed.
* tree-ssa-pre.c: Rewritten entirely.
* tree-ssa-sccvn.c (constant_to_value_id): New hashtable.
(constant_value_ids): Ditto.
(vn_nary_op_t): Moved to header.
(vn_phi_t): Ditto.
(vn_reference_op_t): Ditto
(vn_reference_t): Ditto.
(next_value_id): New variable.
(VN_INFO): Add an assert.
(vn_constant_eq): New function.
(vn_constant_hash): Ditto.
(get_or_alloc_constant_value_id): Ditto.
(value_id_constant_p): Ditto.
(vn_reference_compute_hash): De-staticify.
(copy_reference_ops_from_ref): Don't use get_callee_fndecl.
Disable some code with a FIXME.
Remove VALUE_HANDLE use.
(valueize_refs): Update opcode if it changes from ssa name to
constant.
(vn_reference_lookup_1): Add new argument.
(vn_reference_lookup): Ditto.
(vn_reference_lookup_pieces): New function.
(vn_reference_insert): Add return type. Modify to deal with value
ids.
(vn_reference_insert_pieces): New function.
(vn_nary_op_compute_hash): De-staticify.
(vn_nary_op_eq): Ditto.
(vn_nary_op_lookup_pieces): New function.
(vn_nary_op_lookup): Add new argument.
(vn_nary_op_insert_pieces): New function.
(vn_nary_op_insert): Add return type. Modify to deal with value
ids.
(vn_phi_insert): Ditto.
(visit_unary_op): Update for callee changes.
(visit_binary_op): Ditto.
(visit_reference_op_load): Ditto.
(visit_reference_op_store): Ditto.
(init_scc_vn): Init next_value_id, constant_to_value_id and
constant_value_ids.
(free_scc_vn): Free them.
(set_hashtable_value_ids): New function.
(run_scc_vn): Use it.
(get_max_value_id): New function.
(get_next_value_id): Ditto.
(expressions_equal_p): Moved from tree-vn.c
(sort_vuses): Ditto.
(sort_vuses_heap): Ditto.
* tree-ssa-sccvn.h: Structures moved from tree-ssa-sccvn.c (noted
above).
* tree.c (iterative_hash_hashval_t): Made non-static
* tree.h (iterative_hash_hashval_t): Declare it.
2008-07-08 Martin Jambor <mjambor@suse.cz>
* ipa-cp.c (ipcp_init_cloned_node): Call ipa_check_create_node_params
......
......@@ -1223,7 +1223,6 @@ OBJS-common = \
tree-vect-patterns.o \
tree-vect-transform.o \
tree-vectorizer.o \
tree-vn.o \
tree-vrp.o \
tree.o \
value-prof.o \
......@@ -2109,16 +2108,14 @@ tree-ssa-pre.o : tree-ssa-pre.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(TREE_H) $(GGC_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) \
$(TM_H) coretypes.h $(TREE_DUMP_H) tree-pass.h $(FLAGS_H) $(CFGLOOP_H) \
alloc-pool.h $(BASIC_BLOCK_H) bitmap.h $(HASHTAB_H) $(TREE_GIMPLE_H) \
$(TREE_INLINE_H) tree-iterator.h tree-ssa-sccvn.h $(PARAMS_H)
$(TREE_INLINE_H) tree-iterator.h tree-ssa-sccvn.h $(PARAMS_H) \
$(DBGCNT_H)
tree-ssa-sccvn.o : tree-ssa-sccvn.c $(TREE_FLOW_H) $(CONFIG_H) \
$(SYSTEM_H) $(TREE_H) $(GGC_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) \
$(TM_H) coretypes.h $(TREE_DUMP_H) tree-pass.h $(FLAGS_H) $(CFGLOOP_H) \
alloc-pool.h $(BASIC_BLOCK_H) bitmap.h $(HASHTAB_H) $(TREE_GIMPLE_H) \
$(TREE_INLINE_H) tree-iterator.h tree-ssa-propagate.h tree-ssa-sccvn.h \
$(PARAMS_H)
tree-vn.o : tree-vn.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(GGC_H) \
$(TREE_H) $(TREE_FLOW_H) $(HASHTAB_H) langhooks.h tree-pass.h \
$(TREE_DUMP_H) $(DIAGNOSTIC_H) tree-ssa-sccvn.h
tree-vrp.o : tree-vrp.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \
$(TREE_FLOW_H) tree-pass.h $(TREE_DUMP_H) $(DIAGNOSTIC_H) $(GGC_H) \
$(BASIC_BLOCK_H) tree-ssa-propagate.h $(FLAGS_H) $(TREE_DUMP_H) \
......
......@@ -166,6 +166,7 @@ DEBUG_COUNTER (jump_bypass)
DEBUG_COUNTER (local_alloc_for_sched)
DEBUG_COUNTER (postreload_cse)
DEBUG_COUNTER (pre_insn)
DEBUG_COUNTER (treepre_insert)
DEBUG_COUNTER (sched2_func)
DEBUG_COUNTER (sched_block)
DEBUG_COUNTER (sched_func)
......@@ -174,4 +175,3 @@ DEBUG_COUNTER (sched_region)
DEBUG_COUNTER (sms_sched_loop)
DEBUG_COUNTER (split_for_sched2)
DEBUG_COUNTER (tail_call)
/* This code used to crash fold_convert due to PRE
wanting to fold_convert from a REA_TYPE to an INTEGER_TYPE. */
typedef unsigned int uint32_t;
union double_union
{
double d;
uint32_t i[2];
};
struct _Jv_reent
{
int _errno;
};
_Jv_strtod_r (struct _Jv_reent *ptr, char **se)
{
int bb2, sign;
double aadj, aadj1, adj;
unsigned long y, z;
union double_union rv, *bs = ((void *) 0), *delta = ((void *) 0);
{
ovfl:ptr->_errno = 34;
{
(((uint32_t) 0xfffffL) | ((uint32_t) 0x100000L) * (1024 + 1023 - 1));
}
if ((aadj = _Jv_ratio (delta, bs)) <= 2.)
{
{
if (aadj < 2. / 2)
aadj = 1. / 2;
aadj1 = -aadj;
}
}
{
(rv.i[1]) -= 53 * ((uint32_t) 0x100000L);
adj = aadj1 * _Jv_ulp (rv.d);
rv.d += adj;
if (((rv.i[1]) & ((uint32_t) 0x7ff00000L)) >=
((uint32_t) 0x100000L) * (1024 + 1023 - 53))
{
goto ovfl;
}
}
}
}
......@@ -18,7 +18,7 @@ int foo(int argc)
return d + e;
}
/* PRE of globals doesn't work. */
/* We will move the load of a out of the loop. */
/* { dg-final { scan-tree-dump-times "Eliminated: 1" 1 "pre" { xfail *-*-* } } } */
/* { dg-final { scan-tree-dump-times "Eliminated: 1" 1 "pre" } } */
/* { dg-final { cleanup-tree-dump "pre" } } */
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-pre-stats" } */
unsigned long outcnt;
extern void flush_outbuf(void);
void
bi_windup(unsigned int *outbuf, unsigned int bi_buf)
{
unsigned long t1 = outcnt;
outbuf[t1] = bi_buf;
unsigned long t2 = outcnt;
if (t2 == 16384)
flush_outbuf();
unsigned long t3 = outcnt;
outbuf[t3] = bi_buf;
}
/* We should eliminate one load of outcnt, which will in turn let us eliminate
one multiply of outcnt which will in turn let us eliminate
one add involving outcnt and outbuf. */
/* { dg-final { scan-tree-dump-times "Eliminated: 3" 1 "pre"} } */
/* { dg-final { cleanup-tree-dump "pre" } } */
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-pre-stats" } */
int g2;
struct A {
int a; int b;
}g1;
int foo(int a, int b)
{
if (a > 0)
{
g1.a = a+ b;
}
else
g1.a = b;
g2 = a+b;
return g1.a;
}
/* We will eliminate the g1.a from the return statement as fully redundant,
and remove one calculation of a + b. */
/* { dg-final { scan-tree-dump-times "Eliminated: 2" 1 "pre"} } */
/* { dg-final { cleanup-tree-dump "pre" } } */
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-pre-stats" } */
int *gp;
int foo(int p)
{
int t = 0;
if (p)
t = *gp + 1;
return (*gp + t);
}
/* We will eliminate one load of gp and one indirect load of *gp. */
/* { dg-final { scan-tree-dump-times "Eliminated: 2" 1 "pre"} } */
/* { dg-final { cleanup-tree-dump "pre" } } */
......@@ -1124,9 +1124,10 @@ extern bool remove_stmt_from_eh_region (tree);
extern bool maybe_clean_or_replace_eh_stmt (tree, tree);
/* In tree-ssa-pre.c */
void add_to_value (tree, tree);
void debug_value_expressions (tree);
void print_value_expressions (FILE *, tree);
struct pre_expr_d;
void add_to_value (unsigned int, struct pre_expr_d *);
void debug_value_expressions (unsigned int);
void print_value_expressions (FILE *, unsigned int);
/* In tree-vn.c */
......
......@@ -952,16 +952,12 @@ dump_generic_node (pretty_printer *buffer, tree node, int spc, int flags,
pp_character (buffer, ')');
pp_string (buffer, str);
dump_generic_node (buffer, TREE_OPERAND (node, 1), spc, flags, false);
if (TREE_CODE (op0) != VALUE_HANDLE)
op0 = component_ref_field_offset (node);
if (op0 && TREE_CODE (op0) != INTEGER_CST)
{
op0 = component_ref_field_offset (node);
if (op0 && TREE_CODE (op0) != INTEGER_CST)
{
pp_string (buffer, "{off: ");
pp_string (buffer, "{off: ");
dump_generic_node (buffer, op0, spc, flags, false);
pp_character (buffer, '}');
}
}
break;
......@@ -1789,10 +1785,6 @@ dump_generic_node (pretty_printer *buffer, tree node, int spc, int flags,
pp_string (buffer, ">");
break;
case VALUE_HANDLE:
pp_printf (buffer, "VH.%d", VALUE_HANDLE_ID (node));
break;
case ASSERT_EXPR:
pp_string (buffer, "ASSERT_EXPR <");
dump_generic_node (buffer, ASSERT_EXPR_VAR (node), spc, flags, false);
......
......@@ -1163,7 +1163,7 @@ record_equality (tree x, tree y)
prev_x = x, x = y, y = prev_x, prev_x = prev_y;
else if (prev_x && is_gimple_min_invariant (prev_x))
x = y, y = prev_x, prev_x = prev_y;
else if (prev_y && TREE_CODE (prev_y) != VALUE_HANDLE)
else if (prev_y)
y = prev_y;
/* After the swapping, we must have one SSA_NAME. */
......@@ -1629,7 +1629,7 @@ cprop_operand (tree stmt, use_operand_p op_p)
copy of some other variable, use the value or copy stored in
CONST_AND_COPIES. */
val = SSA_NAME_VALUE (op);
if (val && val != op && TREE_CODE (val) != VALUE_HANDLE)
if (val && val != op)
{
tree op_type, val_type;
......@@ -1969,7 +1969,7 @@ lookup_avail_expr (tree stmt, bool insert)
if (TREE_CODE (lhs) == SSA_NAME)
{
temp = SSA_NAME_VALUE (lhs);
if (temp && TREE_CODE (temp) != VALUE_HANDLE)
if (temp)
lhs = temp;
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -24,6 +24,87 @@
/* TOP of the VN lattice. */
extern tree VN_TOP;
/* N-ary operations in the hashtable consist of length operands, an
opcode, and a type. Result is the value number of the operation,
and hashcode is stored to avoid having to calculate it
repeatedly. */
typedef struct vn_nary_op_s
{
/* Unique identify that all expressions with the same value have. */
unsigned int value_id;
ENUM_BITFIELD(tree_code) opcode : 16;
unsigned length : 16;
hashval_t hashcode;
tree result;
tree type;
tree op[4];
} *vn_nary_op_t;
typedef const struct vn_nary_op_s *const_vn_nary_op_t;
/* Phi nodes in the hashtable consist of their non-VN_TOP phi
arguments, and the basic block the phi is in. Result is the value
number of the operation, and hashcode is stored to avoid having to
calculate it repeatedly. Phi nodes not in the same block are never
considered equivalent. */
typedef struct vn_phi_s
{
/* Unique identifier that all expressions with the same value have. */
unsigned int value_id;
hashval_t hashcode;
VEC (tree, heap) *phiargs;
basic_block block;
tree result;
} *vn_phi_t;
typedef const struct vn_phi_s *const_vn_phi_t;
/* Reference operands only exist in reference operations structures.
They consist of an opcode, type, and some number of operands. For
a given opcode, some, all, or none of the operands may be used.
The operands are there to store the information that makes up the
portion of the addressing calculation that opcode performs. */
typedef struct vn_reference_op_struct
{
enum tree_code opcode;
tree type;
tree op0;
tree op1;
tree op2;
} vn_reference_op_s;
typedef vn_reference_op_s *vn_reference_op_t;
typedef const vn_reference_op_s *const_vn_reference_op_t;
DEF_VEC_O(vn_reference_op_s);
DEF_VEC_ALLOC_O(vn_reference_op_s, heap);
/* A reference operation in the hashtable is representation as a
collection of vuses, representing the memory state at the time of
the operation, and a collection of operands that make up the
addressing calculation. If two vn_reference_t's have the same set
of operands, they access the same memory location. We also store
the resulting value number, and the hashcode. The vuses are
always stored in order sorted by ssa name version. */
typedef struct vn_reference_s
{
/* Unique identifier that all expressions with the same value have. */
unsigned int value_id;
hashval_t hashcode;
VEC (tree, gc) *vuses;
VEC (vn_reference_op_s, heap) *operands;
tree result;
} *vn_reference_t;
typedef const struct vn_reference_s *const_vn_reference_t;
typedef struct vn_constant_s
{
unsigned int value_id;
hashval_t hashcode;
tree constant;
} *vn_constant_t;
typedef struct vn_ssa_aux
{
/* Value number. This may be an SSA name or a constant. */
......@@ -31,6 +112,9 @@ typedef struct vn_ssa_aux
/* Representative expression, if not a direct constant. */
tree expr;
/* Unique identifier that all expressions with the same value have. */
unsigned int value_id;
/* SCC information. */
unsigned int dfsnum;
unsigned int low;
......@@ -57,12 +141,31 @@ extern vn_ssa_aux_t VN_INFO_GET (tree);
bool run_scc_vn (bool);
void free_scc_vn (void);
void switch_to_PRE_table (void);
tree vn_nary_op_lookup (tree);
void vn_nary_op_insert (tree, tree);
tree vn_reference_lookup (tree, VEC (tree, gc) *, bool);
void vn_reference_insert (tree, tree, VEC (tree, gc) *);
tree vn_nary_op_lookup (tree, vn_nary_op_t *);
tree vn_nary_op_lookup_pieces (unsigned int, enum tree_code,
tree, tree, tree, tree, tree,
vn_nary_op_t *);
vn_nary_op_t vn_nary_op_insert (tree, tree);
vn_nary_op_t vn_nary_op_insert_pieces (unsigned int, enum tree_code,
tree, tree, tree, tree,
tree, tree, unsigned int);
tree vn_reference_lookup_pieces (VEC (tree, gc) *,
VEC (vn_reference_op_s, heap) *,
vn_reference_t *);
tree vn_reference_lookup (tree, VEC (tree, gc) *, bool, vn_reference_t *);
vn_reference_t vn_reference_insert (tree, tree, VEC (tree, gc) *);
vn_reference_t vn_reference_insert_pieces (VEC (tree, gc) *,
VEC (vn_reference_op_s, heap) *,
tree, unsigned int);
hashval_t vn_nary_op_compute_hash (const vn_nary_op_t);
int vn_nary_op_eq (const void *, const void *);
hashval_t vn_reference_compute_hash (const vn_reference_t);
int vn_reference_eq (const void *, const void *);
unsigned int get_max_value_id (void);
unsigned int get_next_value_id (void);
unsigned int get_or_alloc_constant_value_id (tree);
bool value_id_constant_p (unsigned int);
VEC (tree, gc) *shared_vuses_from_stmt (tree);
VEC (tree, gc) *copy_vuses_from_stmt (tree);
#endif /* TREE_SSA_SCCVN_H */
......@@ -313,7 +313,7 @@ record_temporary_equivalences_from_stmts_at_dest (edge e,
copy[i++] = use;
if (TREE_CODE (use) == SSA_NAME)
tmp = SSA_NAME_VALUE (use);
if (tmp && TREE_CODE (tmp) != VALUE_HANDLE)
if (tmp)
SET_USE (use_p, tmp);
}
......@@ -407,14 +407,14 @@ simplify_control_stmt_condition (edge e,
if (TREE_CODE (op0) == SSA_NAME)
{
tree tmp = SSA_NAME_VALUE (op0);
if (tmp && TREE_CODE (tmp) != VALUE_HANDLE)
if (tmp)
op0 = tmp;
}
if (TREE_CODE (op1) == SSA_NAME)
{
tree tmp = SSA_NAME_VALUE (op1);
if (tmp && TREE_CODE (tmp) != VALUE_HANDLE)
if (tmp)
op1 = tmp;
}
......
......@@ -462,7 +462,6 @@ tree_code_size (enum tree_code code)
case STATEMENT_LIST: return sizeof (struct tree_statement_list);
case BLOCK: return sizeof (struct tree_block);
case VALUE_HANDLE: return sizeof (struct tree_value_handle);
case CONSTRUCTOR: return sizeof (struct tree_constructor);
default:
......@@ -2387,7 +2386,6 @@ tree_node_structure (const_tree t)
case BLOCK: return TS_BLOCK;
case CONSTRUCTOR: return TS_CONSTRUCTOR;
case TREE_BINFO: return TS_BINFO;
case VALUE_HANDLE: return TS_VALUE_HANDLE;
case OMP_CLAUSE: return TS_OMP_CLAUSE;
default:
......@@ -3639,7 +3637,7 @@ build_decl_attribute_variant (tree ddecl, tree attribute)
/* Produce good hash value combining VAL and VAL2. */
static inline hashval_t
hashval_t
iterative_hash_hashval_t (hashval_t val, hashval_t val2)
{
/* the golden ratio; an arbitrary value. */
......@@ -5358,7 +5356,6 @@ iterative_hash_expr (const_tree t, hashval_t val)
return iterative_hash_expr (TREE_VECTOR_CST_ELTS (t), val);
case SSA_NAME:
case VALUE_HANDLE:
/* we can just compare by pointer. */
return iterative_hash_pointer (t, val);
......
......@@ -925,12 +925,6 @@ DEFTREECODE (POLYNOMIAL_CHREC, "polynomial_chrec", tcc_expression, 3)
Use the interface in tree-iterator.h to access this node. */
DEFTREECODE (STATEMENT_LIST, "statement_list", tcc_exceptional, 0)
/* Value handles. Artificial nodes to represent expressions in
partial redundancy elimination (tree-ssa-pre.c). These nodes are
used for expression canonicalization. If two expressions compute
the same value, they will be assigned the same value handle. */
DEFTREECODE (VALUE_HANDLE, "value_handle", tcc_exceptional, 0)
/* Predicate assertion. Artificial expression generated by the optimizers
to keep track of predicate values. This expression may only appear on
the RHS of assignments.
......
......@@ -3492,26 +3492,6 @@ struct tree_statement_list
struct tree_statement_list_node *tail;
};
#define VALUE_HANDLE_ID(NODE) \
(VALUE_HANDLE_CHECK (NODE)->value_handle.id)
#define VALUE_HANDLE_EXPR_SET(NODE) \
(VALUE_HANDLE_CHECK (NODE)->value_handle.expr_set)
/* Defined and used in tree-ssa-pre.c. */
struct tree_value_handle GTY(())
{
struct tree_common common;
/* The set of expressions represented by this handle. */
struct bitmap_set * GTY ((skip)) expr_set;
/* Unique ID for this value handle. IDs are handed out in a
conveniently dense form starting at 0, so that we can make
bitmaps of value handles. */
unsigned int id;
};
/* Define the overall contents of a tree node.
It may be any of the structures declared above
......@@ -3552,7 +3532,6 @@ union tree_node GTY ((ptr_alias (union lang_tree_node),
struct tree_binfo GTY ((tag ("TS_BINFO"))) binfo;
struct tree_statement_list GTY ((tag ("TS_STATEMENT_LIST"))) stmt_list;
struct gimple_stmt GTY ((tag ("TS_GIMPLE_STATEMENT"))) gstmt;
struct tree_value_handle GTY ((tag ("TS_VALUE_HANDLE"))) value_handle;
struct tree_constructor GTY ((tag ("TS_CONSTRUCTOR"))) constructor;
struct tree_memory_tag GTY ((tag ("TS_MEMORY_TAG"))) mtag;
struct tree_omp_clause GTY ((tag ("TS_OMP_CLAUSE"))) omp_clause;
......@@ -4964,6 +4943,7 @@ extern int tree_log2 (const_tree);
extern int tree_floor_log2 (const_tree);
extern int simple_cst_equal (const_tree, const_tree);
extern hashval_t iterative_hash_expr (const_tree, hashval_t);
extern hashval_t iterative_hash_hashval_t (hashval_t, hashval_t);
extern int compare_tree_int (const_tree, unsigned HOST_WIDE_INT);
extern int type_list_equal (const_tree, const_tree);
extern int chain_member (const_tree, const_tree);
......
......@@ -59,7 +59,6 @@ DEFTREESTRUCT(TS_BLOCK, "block")
DEFTREESTRUCT(TS_BINFO, "binfo")
DEFTREESTRUCT(TS_STATEMENT_LIST, "statement list")
DEFTREESTRUCT(TS_GIMPLE_STATEMENT, "gimple statement")
DEFTREESTRUCT(TS_VALUE_HANDLE, "value handle")
DEFTREESTRUCT(TS_CONSTRUCTOR, "constructor")
DEFTREESTRUCT(TS_MEMORY_TAG, "memory tag")
DEFTREESTRUCT(TS_OMP_CLAUSE, "omp clause")
......
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