aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-outof-ssa.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-outof-ssa.c')
-rw-r--r--gcc/tree-outof-ssa.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/gcc/tree-outof-ssa.c b/gcc/tree-outof-ssa.c
index 827f91d1511..7da0e5920c0 100644
--- a/gcc/tree-outof-ssa.c
+++ b/gcc/tree-outof-ssa.c
@@ -1634,12 +1634,20 @@ find_replaceable_in_bb (temp_expr_table_p tab, basic_block bb)
var_map map = tab->map;
value_expr_p p;
ssa_op_iter iter;
+ bitmap_iterator bi;
for (bsi = bsi_start (bb); !bsi_end_p (bsi); bsi_next (&bsi))
{
stmt = bsi_stmt (bsi);
ann = stmt_ann (stmt);
+ if (TREE_CODE (stmt) == ASM_EXPR && ASM_VOLATILE_P (stmt))
+ {
+ /* Volatile ASM_EXPRs kill all current expressions. */
+ EXECUTE_IF_SET_IN_BITMAP ((tab->partition_in_use), 0, partition, bi)
+ kill_expr (tab, partition, false);
+ continue;
+ }
/* Determine if this stmt finishes an existing expression. */
FOR_EACH_SSA_TREE_OPERAND (def, stmt, iter, SSA_OP_USE)
{
@@ -1912,8 +1920,6 @@ rewrite_trees (var_map map, tree *values)
&& (DEF_FROM_PTR (def_p) == USE_OP (uses, 0)))
remove = 1;
}
- if (changed & !remove)
- modify_stmt (stmt);
}
/* Remove any stmts marked for removal. */
@@ -2022,6 +2028,9 @@ remove_ssa_form (FILE *dump, var_map map, int flags)
}
}
+ /* we no longer maintain the SSA operand cache at this point. */
+ fini_ssa_operands ();
+
dump_file = save;
}