diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-12-07 12:13:23 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-12-07 12:13:23 +0000 |
commit | 007670eddc01d11ff1dcc4229c10c7755e48dca9 (patch) | |
tree | 0373601b01fbd7966bc4a6e634699aef2af18fbd /gcc/tree-ssa.c | |
parent | ec6f02586a7b4bef66a49febd0b491471668d8f7 (diff) | |
download | gcc-007670eddc01d11ff1dcc4229c10c7755e48dca9.tar.gz |
2011-12-07 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 182077 using svnmerge
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@182079 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa.c')
-rw-r--r-- | gcc/tree-ssa.c | 89 |
1 files changed, 7 insertions, 82 deletions
diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c index 8485af0a165..c28167e41aa 100644 --- a/gcc/tree-ssa.c +++ b/gcc/tree-ssa.c @@ -938,6 +938,8 @@ verify_ssa (bool check_modified_stmt) gimple stmt; TREE_VISITED (name) = 0; + verify_ssa_name (name, !is_gimple_reg (name)); + stmt = SSA_NAME_DEF_STMT (name); if (!gimple_nop_p (stmt)) { @@ -987,9 +989,6 @@ verify_ssa (bool check_modified_stmt) { gimple stmt = gsi_stmt (gsi); use_operand_p use_p; - bool has_err; - int count; - unsigned i; if (check_modified_stmt && gimple_modified_p (stmt)) { @@ -999,89 +998,15 @@ verify_ssa (bool check_modified_stmt) goto err; } - if (is_gimple_assign (stmt) - && TREE_CODE (gimple_assign_lhs (stmt)) != SSA_NAME) - { - tree lhs, base_address; - - lhs = gimple_assign_lhs (stmt); - base_address = get_base_address (lhs); - - if (base_address - && SSA_VAR_P (base_address) - && !gimple_vdef (stmt) - && optimize > 0) - { - error ("statement makes a memory store, but has no VDEFS"); - print_gimple_stmt (stderr, stmt, 0, TDF_VOPS); - goto err; - } - } - else if (gimple_debug_bind_p (stmt) - && !gimple_debug_bind_has_value_p (stmt)) - continue; - - /* Verify the single virtual operand and its constraints. */ - has_err = false; - if (gimple_vdef (stmt)) - { - if (gimple_vdef_op (stmt) == NULL_DEF_OPERAND_P) - { - error ("statement has VDEF operand not in defs list"); - has_err = true; - } - if (!gimple_vuse (stmt)) - { - error ("statement has VDEF but no VUSE operand"); - has_err = true; - } - else if (SSA_NAME_VAR (gimple_vdef (stmt)) - != SSA_NAME_VAR (gimple_vuse (stmt))) - { - error ("VDEF and VUSE do not use the same symbol"); - has_err = true; - } - has_err |= verify_ssa_name (gimple_vdef (stmt), true); - } - if (gimple_vuse (stmt)) + if (verify_ssa_operands (stmt)) { - if (gimple_vuse_op (stmt) == NULL_USE_OPERAND_P) - { - error ("statement has VUSE operand not in uses list"); - has_err = true; - } - has_err |= verify_ssa_name (gimple_vuse (stmt), true); - } - if (has_err) - { - error ("in statement"); - print_gimple_stmt (stderr, stmt, 0, TDF_VOPS|TDF_MEMSYMS); + print_gimple_stmt (stderr, stmt, 0, TDF_VOPS); goto err; } - count = 0; - FOR_EACH_SSA_TREE_OPERAND (op, stmt, iter, SSA_OP_USE|SSA_OP_DEF) - { - if (verify_ssa_name (op, false)) - { - error ("in statement"); - print_gimple_stmt (stderr, stmt, 0, TDF_VOPS|TDF_MEMSYMS); - goto err; - } - count++; - } - - for (i = 0; i < gimple_num_ops (stmt); i++) - { - op = gimple_op (stmt, i); - if (op && TREE_CODE (op) == SSA_NAME && --count < 0) - { - error ("number of operands and imm-links don%'t agree" - " in statement"); - print_gimple_stmt (stderr, stmt, 0, TDF_VOPS|TDF_MEMSYMS); - goto err; - } - } + if (gimple_debug_bind_p (stmt) + && !gimple_debug_bind_has_value_p (stmt)) + continue; FOR_EACH_SSA_USE_OPERAND (use_p, stmt, iter, SSA_OP_USE|SSA_OP_VUSE) { |