diff options
author | froydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-08-20 12:48:59 +0000 |
---|---|---|
committer | froydnj <froydnj@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-08-20 12:48:59 +0000 |
commit | 48148244971e4e4bcc2fb879e007afb23db72052 (patch) | |
tree | 7983da0de4d80a3a7b43caa30ccd5dc36d8bf25e /gcc/tree-ssa-structalias.c | |
parent | e83c4d0fa5687f2bb35f7b748a2039f5cc39f0db (diff) | |
download | gcc-48148244971e4e4bcc2fb879e007afb23db72052.tar.gz |
gcc/
* vec.h (FOR_EACH_VEC_ELT): Define.
* c-decl.c: Use it.
* cfgloop.c: Likewise.
* cfgloopmanip.c: Likewise.
* cgraph.c: Likewise.
* cgraphunit.c: Likewise.
* combine.c: Likewise.
* config/bfin/bfin.c: Likewise.
* config/mips/mips.c: Likewise.
* config/rs6000/rs6000.c: Likewise.
* dbxout.c: Likewise.
* df-scan.c: Likewise.
* dominance.c: Likewise.
* dse.c: Likewise.
* dwarf2out.c: Likewise.
* except.c: Likewise.
* expr.c: Likewise.
* function.c: Likewise.
* gcse.c: Likewise.
* genattr.c: Likewise.
* ggc-common.c: Likewise.
* gimplify.c: Likewise.
* graphite-blocking.c: Likewise.
* graphite-clast-to-gimple.c: Likewise.
* graphite-dependences.c: Likewise.
* graphite-interchange.c: Likewise.
* graphite-poly.c: Likewise.
* graphite-scop-detection.c: Likewise.
* graphite-sese-to-poly.c: Likewise.
* graphite.c: Likewise.
* haifa-sched.c: Likewise.
* ifcvt.c: Likewise.
* implicit-zee.c: Likewise.
* ipa-prop.c: Likewise.
* ipa-struct-reorg.c: Likewise.
* ipa.c: Likewise.
* ira-build.c: Likewise.
* ira-color.c: Likewise.
* ira-emit.c: Likewise.
* lambda-code.c: Likewise.
* loop-invariant.c: Likewise.
* loop-unroll.c: Likewise.
* lower-subreg.c: Likewise.
* lto-cgraph.c: Likewise.
* lto-opts.c: Likewise.
* lto-streamer-in.c: Likewise.
* lto-streamer-out.c: Likewise.
* lto-streamer.c: Likewise.
* lto-symtab.c: Likewise.
* matrix-reorg.c: Likewise.
* opts.c: Likewise.
* predict.c: Likewise.
* print-tree.c: Likewise.
* sdbout.c: Likewise.
* sel-sched-dump.c: Likewise.
* sel-sched-ir.c: Likewise.
* sel-sched.c: Likewise.
* sese.c: Likewise.
* stor-layout.c: Likewise.
* tree-cfg.c: Likewise.
* tree-cfgcleanup.c: Likewise.
* tree-chrec.c: Likewise.
* tree-data-ref.c: Likewise.
* tree-emutls.c: Likewise.
* tree-inline.c: Likewise.
* tree-into-ssa.c: Likewise.
* tree-loop-distribution.c: Likewise.
* tree-loop-linear.c: Likewise.
* tree-mudflap.c: Likewise.
* tree-outof-ssa.c: Likewise.
* tree-parloops.c: Likewise.
* tree-predcom.c: Likewise.
* tree-pretty-print.c: Likewise.
* tree-scalar-evolution.c: Likewise.
* tree-ssa-live.c: Likewise.
* tree-ssa-loop-im.c: Likewise.
* tree-ssa-loop-ivcanon.c: Likewise.
* tree-ssa-loop-ivopts.c: Likewise.
* tree-ssa-loop-manip.c: Likewise.
* tree-ssa-loop-niter.c: Likewise.
* tree-ssa-loop-prefetch.c: Likewise.
* tree-ssa-phiprop.c: Likewise.
* tree-ssa-pre.c: Likewise.
* tree-ssa-reassoc.c: Likewise.
* tree-ssa-sccvn.c: Likewise.
* tree-ssa-structalias.c: Likewise.
* tree-ssa.c: Likewise.
* tree-vect-data-refs.c: Likewise.
* tree-vect-loop-manip.c: Likewise.
* tree-vect-loop.c: Likewise.
* tree-vect-patterns.c: Likewise.
* tree-vect-slp.c: Likewise.
* tree-vect-stmts.c: Likewise.
* tree-vrp.c: Likewise.
* tree.c: Likewise.
* value-prof.c: Likewise.
* var-tracking.c: Likewise.
* varasm.c: Likewise.
* vmsdbgout.c: Likewise.
gcc/ada/
* gcc-interface/decl.c: Use FOR_EACH_VEC_ELT.
* gcc-interface/trans.c: Likewise.
* gcc-interface/utils.c: Likewise.
gcc/c-family/
* c-common.c: Use FOR_EACH_VEC_ELT.
* c-gimplify.c: Likewise.
* c-pragma.c: Likewise.
gcc/cp/
* call.c: Use FOR_EACH_VEC_ELT.
* class.c: Likewise.
* decl.c: Likewise.
* decl2.c: Likewise.
* error.c: Likewise.
* except.c: Likewise.
* mangle.c: Likewise.
* method.c: Likewise.
* name-lookup.c: Likewise.
* parser.c: Likewise.
* pt.c: Likewise.
* repo.c: Likewise.
* semantics.c: Likewise.
* typeck2.c: Likewise.
gcc/fortran/
* trans-openmp.c: Use FOR_EACH_VEC_ELT.
gcc/java/
* class.c: Use FOR_EACH_VEC_ELT.
* expr.c: Likewise.
* jcf-parse.c: Likewise.
* resource.c: Likewise.
gcc/lto/
* lto.c: Use FOR_EACH_VEC_ELT.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@163401 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-structalias.c')
-rw-r--r-- | gcc/tree-ssa-structalias.c | 78 |
1 files changed, 39 insertions, 39 deletions
diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c index 37fc6f83a38..ef09014f0d3 100644 --- a/gcc/tree-ssa-structalias.c +++ b/gcc/tree-ssa-structalias.c @@ -814,7 +814,7 @@ dump_constraint_graph (FILE *file) /* Go over the list of constraints printing the edges in the constraint graph. */ fprintf (file, "\n // The constraint edges:\n"); - for (i = 0; VEC_iterate (constraint_t, constraints, i, c); i++) + FOR_EACH_VEC_ELT (constraint_t, constraints, i, c) if (c) dump_constraint_edge (file, c); @@ -939,7 +939,7 @@ constraint_set_union (VEC(constraint_t,heap) **to, int i; constraint_t c; - for (i = 0; VEC_iterate (constraint_t, *from, i, c); i++) + FOR_EACH_VEC_ELT (constraint_t, *from, i, c) { if (constraint_vec_find (*to, *c) == NULL) { @@ -1096,7 +1096,7 @@ merge_node_constraints (constraint_graph_t graph, unsigned int to, gcc_assert (find (from) == to); /* Move all complex constraints from src node into to node */ - for (i = 0; VEC_iterate (constraint_t, graph->complex[from], i, c); i++) + FOR_EACH_VEC_ELT (constraint_t, graph->complex[from], i, c) { /* In complex constraints for node src, we may have either a = *src, and *src = a, or an offseted constraint which are @@ -1280,7 +1280,7 @@ build_pred_graph (void) for (j = 0; j < VEC_length (varinfo_t, varmap); j++) graph->indirect_cycles[j] = -1; - for (i = 0; VEC_iterate (constraint_t, constraints, i, c); i++) + FOR_EACH_VEC_ELT (constraint_t, constraints, i, c) { struct constraint_expr lhs = c->lhs; struct constraint_expr rhs = c->rhs; @@ -1359,7 +1359,7 @@ build_succ_graph (void) unsigned i, t; constraint_t c; - for (i = 0; VEC_iterate (constraint_t, constraints, i, c); i++) + FOR_EACH_VEC_ELT (constraint_t, constraints, i, c) { struct constraint_expr lhs; struct constraint_expr rhs; @@ -2437,7 +2437,7 @@ move_complex_constraints (constraint_graph_t graph) int i; constraint_t c; - for (i = 0; VEC_iterate (constraint_t, constraints, i, c); i++) + FOR_EACH_VEC_ELT (constraint_t, constraints, i, c) { if (c) { @@ -2478,7 +2478,7 @@ rewrite_constraints (constraint_graph_t graph, for (j = 0; j < graph->size; j++) gcc_assert (find (j) == j); - for (i = 0; VEC_iterate (constraint_t, constraints, i, c); i++) + FOR_EACH_VEC_ELT (constraint_t, constraints, i, c) { struct constraint_expr lhs = c->lhs; struct constraint_expr rhs = c->rhs; @@ -2654,7 +2654,7 @@ solve_graph (constraint_graph_t graph) solution_empty = bitmap_empty_p (solution); /* Process the complex constraints */ - for (j = 0; VEC_iterate (constraint_t, complex, j, c); j++) + FOR_EACH_VEC_ELT (constraint_t, complex, j, c) { /* XXX: This is going to unsort the constraints in some cases, which will occasionally add duplicate @@ -3239,7 +3239,7 @@ do_deref (VEC (ce_s, heap) **constraints) struct constraint_expr *c; unsigned int i = 0; - for (i = 0; VEC_iterate (ce_s, *constraints, i, c); i++) + FOR_EACH_VEC_ELT (ce_s, *constraints, i, c) { if (c->type == SCALAR) c->type = DEREF; @@ -3270,7 +3270,7 @@ get_constraint_for_address_of (tree t, VEC (ce_s, heap) **results) get_constraint_for_1 (t, results, true); - for (i = 0; VEC_iterate (ce_s, *results, i, c); i++) + FOR_EACH_VEC_ELT (ce_s, *results, i, c) { if (c->type == DEREF) c->type = SCALAR; @@ -3383,7 +3383,7 @@ get_constraint_for_1 (tree t, VEC (ce_s, heap) **results, bool address_p) struct constraint_expr *rhsp; unsigned j; get_constraint_for_1 (val, &tmp, address_p); - for (j = 0; VEC_iterate (ce_s, tmp, j, rhsp); ++j) + FOR_EACH_VEC_ELT (ce_s, tmp, j, rhsp) VEC_safe_push (ce_s, heap, *results, rhsp); VEC_truncate (ce_s, tmp, 0); } @@ -3435,17 +3435,17 @@ process_all_all_constraints (VEC (ce_s, heap) *lhsc, VEC (ce_s, heap) *rhsc) if (VEC_length (ce_s, lhsc) <= 1 || VEC_length (ce_s, rhsc) <= 1) { - for (i = 0; VEC_iterate (ce_s, lhsc, i, lhsp); ++i) - for (j = 0; VEC_iterate (ce_s, rhsc, j, rhsp); ++j) + FOR_EACH_VEC_ELT (ce_s, lhsc, i, lhsp) + FOR_EACH_VEC_ELT (ce_s, rhsc, j, rhsp) process_constraint (new_constraint (*lhsp, *rhsp)); } else { struct constraint_expr tmp; tmp = new_scalar_tmp_constraint_exp ("allalltmp"); - for (i = 0; VEC_iterate (ce_s, rhsc, i, rhsp); ++i) + FOR_EACH_VEC_ELT (ce_s, rhsc, i, rhsp) process_constraint (new_constraint (tmp, *rhsp)); - for (i = 0; VEC_iterate (ce_s, lhsc, i, lhsp); ++i) + FOR_EACH_VEC_ELT (ce_s, lhsc, i, lhsp) process_constraint (new_constraint (*lhsp, tmp)); } } @@ -3532,7 +3532,7 @@ make_constraint_to (unsigned id, tree op) includes.type = SCALAR; get_constraint_for (op, &rhsc); - for (j = 0; VEC_iterate (ce_s, rhsc, j, c); j++) + FOR_EACH_VEC_ELT (ce_s, rhsc, j, c) process_constraint (new_constraint (includes, *c)); VEC_free (ce_s, heap, rhsc); } @@ -3795,7 +3795,7 @@ handle_rhs_call (gimple stmt, VEC(ce_s, heap) **results) lhsc.var = escaped_id; lhsc.offset = 0; lhsc.type = SCALAR; - for (i = 0; VEC_iterate (ce_s, tmpc, i, c); ++i) + FOR_EACH_VEC_ELT (ce_s, tmpc, i, c) process_constraint (new_constraint (lhsc, *c)); VEC_free(ce_s, heap, tmpc); } @@ -3905,7 +3905,7 @@ handle_const_call (gimple stmt, VEC(ce_s, heap) **results) unsigned i; struct constraint_expr *argp; get_constraint_for (arg, &argc); - for (i = 0; VEC_iterate (ce_s, argc, i, argp); ++i) + FOR_EACH_VEC_ELT (ce_s, argc, i, argp) VEC_safe_push (ce_s, heap, *results, argp); VEC_free(ce_s, heap, argc); } @@ -4040,7 +4040,7 @@ find_func_aliases (gimple origt) STRIP_NOPS (strippedrhs); get_constraint_for (gimple_phi_arg_def (t, i), &rhsc); - for (j = 0; VEC_iterate (ce_s, lhsc, j, c); j++) + FOR_EACH_VEC_ELT (ce_s, lhsc, j, c) { struct constraint_expr *c2; while (VEC_length (ce_s, rhsc) > 0) @@ -4141,7 +4141,7 @@ find_func_aliases (gimple origt) ac.var = integer_id; } ac.offset = 0; - for (i = 0; VEC_iterate (ce_s, lhsc, i, lhsp); ++i) + FOR_EACH_VEC_ELT (ce_s, lhsc, i, lhsp) process_constraint (new_constraint (*lhsp, ac)); VEC_free (ce_s, heap, lhsc); return; @@ -4187,7 +4187,7 @@ find_func_aliases (gimple origt) { lhs = get_function_part_constraint (nfi, fi_static_chain); get_constraint_for (frame, &rhsc); - for (i = 0; VEC_iterate (ce_s, rhsc, i, rhsp); ++i) + FOR_EACH_VEC_ELT (ce_s, rhsc, i, rhsp) process_constraint (new_constraint (lhs, *rhsp)); VEC_free (ce_s, heap, rhsc); @@ -4239,7 +4239,7 @@ find_func_aliases (gimple origt) do_deref (&lhsc); rhs = get_function_part_constraint (fi, ~0); rhs.type = ADDRESSOF; - for (i = 0; VEC_iterate (ce_s, lhsc, i, lhsp); ++i) + FOR_EACH_VEC_ELT (ce_s, lhsc, i, lhsp) process_constraint (new_constraint (*lhsp, rhs)); VEC_free (ce_s, heap, lhsc); /* va_list is clobbered. */ @@ -4352,7 +4352,7 @@ find_func_aliases (gimple origt) rhs = *VEC_index (ce_s, tem, 0); VEC_free(ce_s, heap, tem); } - for (j = 0; VEC_iterate (ce_s, lhsc, j, lhsp); j++) + FOR_EACH_VEC_ELT (ce_s, lhsc, j, lhsp) process_constraint (new_constraint (*lhsp, rhs)); } @@ -4367,7 +4367,7 @@ find_func_aliases (gimple origt) get_constraint_for_address_of (lhsop, &rhsc); lhs = get_function_part_constraint (fi, fi_result); - for (j = 0; VEC_iterate (ce_s, rhsc, j, rhsp); j++) + FOR_EACH_VEC_ELT (ce_s, rhsc, j, rhsp) process_constraint (new_constraint (lhs, *rhsp)); VEC_free (ce_s, heap, rhsc); } @@ -4380,7 +4380,7 @@ find_func_aliases (gimple origt) get_constraint_for (gimple_call_chain (t), &rhsc); lhs = get_function_part_constraint (fi, fi_static_chain); - for (j = 0; VEC_iterate (ce_s, rhsc, j, rhsp); j++) + FOR_EACH_VEC_ELT (ce_s, rhsc, j, rhsp) process_constraint (new_constraint (lhs, *rhsp)); } } @@ -4469,7 +4469,7 @@ find_func_aliases (gimple origt) lhs = get_function_part_constraint (fi, fi_result); get_constraint_for (gimple_return_retval (t), &rhsc); - for (i = 0; VEC_iterate (ce_s, rhsc, i, rhsp); i++) + FOR_EACH_VEC_ELT (ce_s, rhsc, i, rhsp) process_constraint (new_constraint (lhs, *rhsp)); } } @@ -4509,7 +4509,7 @@ find_func_aliases (gimple origt) rhsc.var = nonlocal_id; rhsc.offset = 0; rhsc.type = SCALAR; - for (j = 0; VEC_iterate (ce_s, lhsc, j, lhsp); j++) + FOR_EACH_VEC_ELT (ce_s, lhsc, j, lhsp) process_constraint (new_constraint (*lhsp, rhsc)); VEC_free (ce_s, heap, lhsc); } @@ -4551,7 +4551,7 @@ process_ipa_clobber (varinfo_t fi, tree ptr) unsigned i; get_constraint_for (ptr, &ptrc); lhs = get_function_part_constraint (fi, fi_clobbers); - for (i = 0; VEC_iterate (ce_s, ptrc, i, c); i++) + FOR_EACH_VEC_ELT (ce_s, ptrc, i, c) process_constraint (new_constraint (lhs, *c)); VEC_free (ce_s, heap, ptrc); } @@ -4602,7 +4602,7 @@ find_func_clobbers (gimple origt) unsigned i; lhsc = get_function_part_constraint (fi, fi_clobbers); get_constraint_for_address_of (lhs, &rhsc); - for (i = 0; VEC_iterate (ce_s, rhsc, i, rhsp); i++) + FOR_EACH_VEC_ELT (ce_s, rhsc, i, rhsp) process_constraint (new_constraint (lhsc, *rhsp)); VEC_free (ce_s, heap, rhsc); } @@ -4630,7 +4630,7 @@ find_func_clobbers (gimple origt) unsigned i; lhs = get_function_part_constraint (fi, fi_uses); get_constraint_for_address_of (rhs, &rhsc); - for (i = 0; VEC_iterate (ce_s, rhsc, i, rhsp); i++) + FOR_EACH_VEC_ELT (ce_s, rhsc, i, rhsp) process_constraint (new_constraint (lhs, *rhsp)); VEC_free (ce_s, heap, rhsc); } @@ -4670,12 +4670,12 @@ find_func_clobbers (gimple origt) struct constraint_expr *rhsp, *lhsp; get_constraint_for_ptr_offset (dest, NULL_TREE, &lhsc); lhs = get_function_part_constraint (fi, fi_clobbers); - for (i = 0; VEC_iterate (ce_s, lhsc, i, lhsp); i++) + FOR_EACH_VEC_ELT (ce_s, lhsc, i, lhsp) process_constraint (new_constraint (lhs, *lhsp)); VEC_free (ce_s, heap, lhsc); get_constraint_for_ptr_offset (src, NULL_TREE, &rhsc); lhs = get_function_part_constraint (fi, fi_uses); - for (i = 0; VEC_iterate (ce_s, rhsc, i, rhsp); i++) + FOR_EACH_VEC_ELT (ce_s, rhsc, i, rhsp) process_constraint (new_constraint (lhs, *rhsp)); VEC_free (ce_s, heap, rhsc); return; @@ -4689,7 +4689,7 @@ find_func_clobbers (gimple origt) ce_s *lhsp; get_constraint_for_ptr_offset (dest, NULL_TREE, &lhsc); lhs = get_function_part_constraint (fi, fi_clobbers); - for (i = 0; VEC_iterate (ce_s, lhsc, i, lhsp); i++) + FOR_EACH_VEC_ELT (ce_s, lhsc, i, lhsp) process_constraint (new_constraint (lhs, *lhsp)); VEC_free (ce_s, heap, lhsc); return; @@ -4758,7 +4758,7 @@ find_func_clobbers (gimple origt) continue; get_constraint_for_address_of (arg, &rhsc); - for (j = 0; VEC_iterate (ce_s, rhsc, j, rhsp); j++) + FOR_EACH_VEC_ELT (ce_s, rhsc, j, rhsp) process_constraint (new_constraint (lhs, *rhsp)); VEC_free (ce_s, heap, rhsc); } @@ -5269,7 +5269,7 @@ check_for_overlaps (VEC (fieldoff_s,heap) *fieldstack) unsigned int i; HOST_WIDE_INT lastoffset = -1; - for (i = 0; VEC_iterate (fieldoff_s, fieldstack, i, fo); i++) + FOR_EACH_VEC_ELT (fieldoff_s, fieldstack, i, fo) { if (fo->offset == lastoffset) return true; @@ -5434,7 +5434,7 @@ create_variable_info_for (tree decl, const char *name) lhs.var = vi->id; lhs.offset = 0; lhs.type = SCALAR; - for (i = 0; VEC_iterate (ce_s, rhsc, i, rhsp); ++i) + FOR_EACH_VEC_ELT (ce_s, rhsc, i, rhsp) process_constraint (new_constraint (lhs, *rhsp)); /* If this is a variable that escapes from the unit the initializer escapes as well. */ @@ -5443,7 +5443,7 @@ create_variable_info_for (tree decl, const char *name) lhs.var = escaped_id; lhs.offset = 0; lhs.type = SCALAR; - for (i = 0; VEC_iterate (ce_s, rhsc, i, rhsp); ++i) + FOR_EACH_VEC_ELT (ce_s, rhsc, i, rhsp) process_constraint (new_constraint (lhs, *rhsp)); } VEC_free (ce_s, heap, rhsc); @@ -6468,7 +6468,7 @@ compute_points_to_sets (void) cfun->gimple_df->escaped.escaped = 0; /* Mark escaped HEAP variables as global. */ - for (i = 0; VEC_iterate (varinfo_t, varmap, i, vi); ++i) + FOR_EACH_VEC_ELT (varinfo_t, varmap, i, vi) if (vi->is_heap_var && !vi->is_restrict_var && !vi->is_global_var) @@ -6846,7 +6846,7 @@ ipa_pta_execute (void) fn = DECL_STRUCT_FUNCTION (node->decl); /* Compute the points-to sets for pointer SSA_NAMEs. */ - for (i = 0; VEC_iterate (tree, fn->gimple_df->ssa_names, i, ptr); ++i) + FOR_EACH_VEC_ELT (tree, fn->gimple_df->ssa_names, i, ptr) { if (ptr && POINTER_TYPE_P (TREE_TYPE (ptr))) |