diff options
author | dnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-01-08 18:31:39 +0000 |
---|---|---|
committer | dnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-01-08 18:31:39 +0000 |
commit | 52c2a30751c74e52a07a2905cd875994db2803a8 (patch) | |
tree | 0414cc3da4abf709fe841647da112fa2d898af87 /gcc/tree-ssa-dse.c | |
parent | 5a0046ea4f29a9e700176205b0e5a6ac41417981 (diff) | |
download | gcc-52c2a30751c74e52a07a2905cd875994db2803a8.tar.gz |
2005-01-08 Jeff Law <law@redhat.com>
Diego Novillo <dnovillo@redhat.com>
* tree-nrv.c (tree_nrv): Ignore volatile return values.
* tree-ssa-dse.c (dse_optimize_stmt): Do not optimize
statements with volatile operands.
* tree-ssa-operands.c (add_stmt_operand): Do add volatile
operands after marking a statement with has_volatile_ops.
testsuite/ChangeLog:
2005-01-08 Diego Novillo <dnovillo@redhat.com>
* gcc.dg/pr18241-1.c: New test.
* gcc.dg/pr18241-2.c: New test.
* gcc.dg/pr18241-3.c: New test.
* gcc.dg/pr18241-4.c: New test.
* gcc.dg/pr18241-5.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@93088 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-dse.c')
-rw-r--r-- | gcc/tree-ssa-dse.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/tree-ssa-dse.c b/gcc/tree-ssa-dse.c index 93ceaeb0730..86622e96bb2 100644 --- a/gcc/tree-ssa-dse.c +++ b/gcc/tree-ssa-dse.c @@ -259,6 +259,10 @@ dse_optimize_stmt (struct dom_walk_data *walk_data, not also a function call, then record it into our table. */ if (get_call_expr_in (stmt)) return; + + if (ann->has_volatile_ops) + return; + if (TREE_CODE (stmt) == MODIFY_EXPR) { dataflow_t df = get_immediate_uses (stmt); |