diff options
author | Kugan Vivekanandarajah <kuganv@linaro.org> | 2016-09-15 02:03:51 +0000 |
---|---|---|
committer | Kugan Vivekanandarajah <kugan@gcc.gnu.org> | 2016-09-15 02:03:51 +0000 |
commit | 46aa019a01e8278b12961c63fb457306e09cf13f (patch) | |
tree | 39c6eda48c393bf21246adc888f27ba357e13f17 /gcc/tree-ssa.c | |
parent | 7332afeab41a577291ea7bc20a353bcab0bd7476 (diff) | |
download | gcc-46aa019a01e8278b12961c63fb457306e09cf13f.zip gcc-46aa019a01e8278b12961c63fb457306e09cf13f.tar.gz gcc-46aa019a01e8278b12961c63fb457306e09cf13f.tar.bz2 |
Iterator to visit SSA
Iterator to visit SSA
gcc/ChangeLog:
2016-09-15 Kugan Vivekanandarajah <kuganv@linaro.org>
* tree-ssanames.h (FOR_EACH_SSA_NAME): New.
* cfgexpand.c (update_alias_info_with_stack_vars): Use
FOR_EACH_SSA_NAME to iterate over SSA variables.
(pass_expand::execute): Likewise.
* omp-simd-clone.c (ipa_simd_modify_function_body): Likewise.
* tree-cfg.c (dump_function_to_file): Likewise.
* tree-into-ssa.c (pass_build_ssa::execute): Likewise.
(update_ssa): Likewise.
* tree-ssa-alias.c (dump_alias_info): Likewise.
* tree-ssa-ccp.c (ccp_finalize): Likewise.
* tree-ssa-coalesce.c (build_ssa_conflict_graph): Likewise.
(create_outofssa_var_map): Likewise.
(coalesce_ssa_name): Likewise.
* tree-ssa-operands.c (dump_immediate_uses): Likewise.
* tree-ssa-pre.c (compute_avail): Likewise.
* tree-ssa-sccvn.c (init_scc_vn): Likewise.
(scc_vn_restore_ssa_info): Likewise.
(free_scc_vn): Likwise.
(run_scc_vn): Likewise.
* tree-ssa-structalias.c (compute_points_to_sets): Likewise.
* tree-ssa-ter.c (new_temp_expr_table): Likewise.
* tree-ssa-copy.c (fini_copy_prop): Likewise.
* tree-ssa.c (verify_ssa): Likewise.
From-SVN: r240152
Diffstat (limited to 'gcc/tree-ssa.c')
-rw-r--r-- | gcc/tree-ssa.c | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c index aae383d..d442a5f 100644 --- a/gcc/tree-ssa.c +++ b/gcc/tree-ssa.c @@ -1005,7 +1005,6 @@ error: DEBUG_FUNCTION void verify_ssa (bool check_modified_stmt, bool check_ssa_operands) { - size_t i; basic_block bb; basic_block *definition_block = XCNEWVEC (basic_block, num_ssa_names); ssa_op_iter iter; @@ -1018,24 +1017,23 @@ verify_ssa (bool check_modified_stmt, bool check_ssa_operands) timevar_push (TV_TREE_SSA_VERIFY); /* Keep track of SSA names present in the IL. */ - for (i = 1; i < num_ssa_names; i++) + size_t i; + tree name; + + FOR_EACH_SSA_NAME (i, name, cfun) { - tree name = ssa_name (i); - if (name) - { - gimple *stmt; - TREE_VISITED (name) = 0; + gimple *stmt; + TREE_VISITED (name) = 0; - verify_ssa_name (name, virtual_operand_p (name)); + verify_ssa_name (name, virtual_operand_p (name)); - stmt = SSA_NAME_DEF_STMT (name); - if (!gimple_nop_p (stmt)) - { - basic_block bb = gimple_bb (stmt); - if (verify_def (bb, definition_block, - name, stmt, virtual_operand_p (name))) - goto err; - } + stmt = SSA_NAME_DEF_STMT (name); + if (!gimple_nop_p (stmt)) + { + basic_block bb = gimple_bb (stmt); + if (verify_def (bb, definition_block, + name, stmt, virtual_operand_p (name))) + goto err; } } |