Commit 28f6b1e4 by Diego Novillo Committed by Diego Novillo

tree-flow.h (struct fieldoff): Reformat comment.


	* tree-flow.h (struct fieldoff): Reformat comment.
	Document fields.
	* tree-ssa-operands.c: Tidy top-level comments.
	(add_vop): Likewise.
	(add_vars_for_offset): Tidy parameter formatting..
	(get_addr_dereference_operands): Likewise.
	(get_indirect_ref_operands): Likewise.
	(get_expr_operands) <OMP_ATOMIC_LOAD>: Reformat.
	<OMP_ATOMIC_STORE>: Likewise.

From-SVN: r129956
parent 31de5c74
...@@ -5,6 +5,18 @@ ...@@ -5,6 +5,18 @@
* haifa-sched.c (check_sched_flags): Remove. * haifa-sched.c (check_sched_flags): Remove.
(sched_init): Don't call it. (sched_init): Don't call it.
2007-11-06 Diego Novillo <dnovillo@google.com>
* tree-flow.h (struct fieldoff): Reformat comment.
Document fields.
* tree-ssa-operands.c: Tidy top-level comments.
(add_vop): Likewise.
(add_vars_for_offset): Tidy parameter formatting..
(get_addr_dereference_operands): Likewise.
(get_indirect_ref_operands): Likewise.
(get_expr_operands) <OMP_ATOMIC_LOAD>: Reformat.
<OMP_ATOMIC_STORE>: Likewise.
2007-11-06 Rask Ingemann Lambertsen <rask@sygehus.dk> 2007-11-06 Rask Ingemann Lambertsen <rask@sygehus.dk>
PR target/32787 PR target/32787
...@@ -1143,17 +1143,26 @@ rtx addr_for_mem_ref (struct mem_address *, bool); ...@@ -1143,17 +1143,26 @@ rtx addr_for_mem_ref (struct mem_address *, bool);
void get_address_description (tree, struct mem_address *); void get_address_description (tree, struct mem_address *);
tree maybe_fold_tmr (tree); tree maybe_fold_tmr (tree);
/* This structure is simply used during pushing fields onto the fieldstack /* This structure is used during pushing fields onto the fieldstack
to track the offset of the field, since bitpos_of_field gives it relative to track the offset of the field, since bitpos_of_field gives it
to its immediate containing type, and we want it relative to the ultimate relative to its immediate containing type, and we want it relative
containing object. */ to the ultimate containing object. */
struct fieldoff struct fieldoff
{ {
/* Type of the field. */
tree type; tree type;
/* Size, in bits, of the field. */
tree size; tree size;
/* Field. */
tree decl; tree decl;
/* Offset from the base of the base containing object to this field. */
HOST_WIDE_INT offset; HOST_WIDE_INT offset;
/* Alias set for the field. */
alias_set_type alias_set; alias_set_type alias_set;
}; };
typedef struct fieldoff fieldoff_s; typedef struct fieldoff fieldoff_s;
......
...@@ -70,9 +70,9 @@ along with GCC; see the file COPYING3. If not see ...@@ -70,9 +70,9 @@ along with GCC; see the file COPYING3. If not see
variable, and that same variable occurs in the same operands cache, then variable, and that same variable occurs in the same operands cache, then
the new cache vector will also get the same SSA_NAME. the new cache vector will also get the same SSA_NAME.
i.e., if a stmt had a VUSE of 'a_5', and 'a' occurs in the new operand i.e., if a stmt had a VUSE of 'a_5', and 'a' occurs in the new
vector for VUSE, then the new vector will also be modified such that operand vector for VUSE, then the new vector will also be modified
it contains 'a_5' rather than 'a'. */ such that it contains 'a_5' rather than 'a'. */
/* Structure storing statistics on how many call clobbers we have, and /* Structure storing statistics on how many call clobbers we have, and
...@@ -615,9 +615,9 @@ add_use_op (tree stmt, tree *op, use_optype_p last) ...@@ -615,9 +615,9 @@ add_use_op (tree stmt, tree *op, use_optype_p last)
} }
/* Return a virtual op pointer with NUM elements which are all initialized to OP /* Return a virtual op pointer with NUM elements which are all
and are linked into the immediate uses for STMT. The new vop is appended initialized to OP and are linked into the immediate uses for STMT.
after PREV. */ The new vop is appended after PREV. */
static inline voptype_p static inline voptype_p
add_vop (tree stmt, tree op, int num, voptype_p prev) add_vop (tree stmt, tree op, int num, voptype_p prev)
...@@ -1389,9 +1389,8 @@ access_can_touch_variable (tree ref, tree alias, HOST_WIDE_INT offset, ...@@ -1389,9 +1389,8 @@ access_can_touch_variable (tree ref, tree alias, HOST_WIDE_INT offset,
SFT's for a structure. */ SFT's for a structure. */
static bool static bool
add_vars_for_offset (tree var, add_vars_for_offset (tree var, unsigned HOST_WIDE_INT offset,
unsigned HOST_WIDE_INT offset, unsigned HOST_WIDE_INT size, unsigned HOST_WIDE_INT size, bool is_def)
bool is_def)
{ {
bool added = false; bool added = false;
tree subvar; tree subvar;
...@@ -1423,6 +1422,7 @@ add_vars_for_offset (tree var, ...@@ -1423,6 +1422,7 @@ add_vars_for_offset (tree var,
return added; return added;
} }
/* Add VAR to the virtual operands array. FLAGS is as in /* Add VAR to the virtual operands array. FLAGS is as in
get_expr_operands. FULL_REF is a tree that contains the entire get_expr_operands. FULL_REF is a tree that contains the entire
pointer dereference expression, if available, or NULL otherwise. pointer dereference expression, if available, or NULL otherwise.
...@@ -1597,11 +1597,10 @@ add_stmt_operand (tree *var_p, stmt_ann_t s_ann, int flags) ...@@ -1597,11 +1597,10 @@ add_stmt_operand (tree *var_p, stmt_ann_t s_ann, int flags)
is the same as in get_indirect_ref_operands. */ is the same as in get_indirect_ref_operands. */
static void static void
get_addr_dereference_operands (tree stmt, tree *addr, int flags, get_addr_dereference_operands (tree stmt, tree *addr, int flags, tree full_ref,
tree full_ref,
HOST_WIDE_INT offset, HOST_WIDE_INT size, HOST_WIDE_INT offset, HOST_WIDE_INT size,
bool recurse_on_base) bool recurse_on_base)
{ {
tree ptr = *addr; tree ptr = *addr;
stmt_ann_t s_ann = stmt_ann (stmt); stmt_ann_t s_ann = stmt_ann (stmt);
...@@ -1678,6 +1677,7 @@ get_addr_dereference_operands (tree stmt, tree *addr, int flags, ...@@ -1678,6 +1677,7 @@ get_addr_dereference_operands (tree stmt, tree *addr, int flags,
get_expr_operands (stmt, addr, opf_use); get_expr_operands (stmt, addr, opf_use);
} }
/* A subroutine of get_expr_operands to handle INDIRECT_REF, /* A subroutine of get_expr_operands to handle INDIRECT_REF,
ALIGN_INDIRECT_REF and MISALIGNED_INDIRECT_REF. ALIGN_INDIRECT_REF and MISALIGNED_INDIRECT_REF.
...@@ -1697,8 +1697,7 @@ get_addr_dereference_operands (tree stmt, tree *addr, int flags, ...@@ -1697,8 +1697,7 @@ get_addr_dereference_operands (tree stmt, tree *addr, int flags,
something else will do it for us. */ something else will do it for us. */
static void static void
get_indirect_ref_operands (tree stmt, tree expr, int flags, get_indirect_ref_operands (tree stmt, tree expr, int flags, tree full_ref,
tree full_ref,
HOST_WIDE_INT offset, HOST_WIDE_INT size, HOST_WIDE_INT offset, HOST_WIDE_INT size,
bool recurse_on_base) bool recurse_on_base)
{ {
...@@ -1708,10 +1707,11 @@ get_indirect_ref_operands (tree stmt, tree expr, int flags, ...@@ -1708,10 +1707,11 @@ get_indirect_ref_operands (tree stmt, tree expr, int flags,
if (TREE_THIS_VOLATILE (expr)) if (TREE_THIS_VOLATILE (expr))
s_ann->has_volatile_ops = true; s_ann->has_volatile_ops = true;
get_addr_dereference_operands (stmt, pptr, flags, full_ref, get_addr_dereference_operands (stmt, pptr, flags, full_ref, offset, size,
offset, size, recurse_on_base); recurse_on_base);
} }
/* A subroutine of get_expr_operands to handle TARGET_MEM_REF. */ /* A subroutine of get_expr_operands to handle TARGET_MEM_REF. */
static void static void
...@@ -2274,7 +2274,8 @@ get_expr_operands (tree stmt, tree *expr_p, int flags) ...@@ -2274,7 +2274,8 @@ get_expr_operands (tree stmt, tree *expr_p, int flags)
get_expr_operands (stmt, &GIMPLE_STMT_OPERAND (init, 0), opf_def); get_expr_operands (stmt, &GIMPLE_STMT_OPERAND (init, 0), opf_def);
get_expr_operands (stmt, &GIMPLE_STMT_OPERAND (init, 1), opf_use); get_expr_operands (stmt, &GIMPLE_STMT_OPERAND (init, 1), opf_use);
get_expr_operands (stmt, &TREE_OPERAND (cond, 1), opf_use); get_expr_operands (stmt, &TREE_OPERAND (cond, 1), opf_use);
get_expr_operands (stmt, &TREE_OPERAND (GIMPLE_STMT_OPERAND (incr, 1), 1), get_expr_operands (stmt,
&TREE_OPERAND (GIMPLE_STMT_OPERAND (incr, 1), 1),
opf_use); opf_use);
c = find_omp_clause (clauses, OMP_CLAUSE_SCHEDULE); c = find_omp_clause (clauses, OMP_CLAUSE_SCHEDULE);
...@@ -2455,12 +2456,14 @@ build_ssa_operands (tree stmt) ...@@ -2455,12 +2456,14 @@ build_ssa_operands (tree stmt)
if (ann->addresses_taken && bitmap_empty_p (ann->addresses_taken)) if (ann->addresses_taken && bitmap_empty_p (ann->addresses_taken))
ann->addresses_taken = NULL; ann->addresses_taken = NULL;
/* For added safety, assume that statements with volatile operands /* For added safety, assume that statements with volatile operands
also reference memory. */ also reference memory. */
if (ann->has_volatile_ops) if (ann->has_volatile_ops)
ann->references_memory = true; ann->references_memory = true;
} }
/* Releases the operands of STMT back to their freelists, and clears /* Releases the operands of STMT back to their freelists, and clears
the stmt operand lists. */ the stmt operand lists. */
...@@ -2512,6 +2515,7 @@ free_stmt_operands (tree stmt) ...@@ -2512,6 +2515,7 @@ free_stmt_operands (tree stmt)
} }
} }
/* Free any operands vectors in OPS. */ /* Free any operands vectors in OPS. */
void void
......
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