aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAndrew MacLeod <amacleod@redhat.com>2022-03-31 09:36:59 -0400
committerAndrew MacLeod <amacleod@redhat.com>2022-06-16 14:02:25 -0400
commit5b1594dc2d053803ae98ae39f76fbd71f35cb657 (patch)
tree328e4d202909e706c363f52e4e7d862e62c018f2 /gcc
parent9642d07c35f14b9917cd115e8a9f0210fbcdcf4f (diff)
downloadgcc-5b1594dc2d053803ae98ae39f76fbd71f35cb657.zip
gcc-5b1594dc2d053803ae98ae39f76fbd71f35cb657.tar.gz
gcc-5b1594dc2d053803ae98ae39f76fbd71f35cb657.tar.bz2
Propagator should call value_of_stmt.
When evaluating the LHS of a stmt, its more efficent/better to call value_of_stmt directly rather than value_of_expr. * tree-ssa-propagate.cc (before_dom_children): Call value_of_stmt.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/tree-ssa-propagate.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/tree-ssa-propagate.cc b/gcc/tree-ssa-propagate.cc
index c10ffd9..5983f02 100644
--- a/gcc/tree-ssa-propagate.cc
+++ b/gcc/tree-ssa-propagate.cc
@@ -813,7 +813,7 @@ substitute_and_fold_dom_walker::before_dom_children (basic_block bb)
tree lhs = gimple_get_lhs (stmt);
if (lhs && TREE_CODE (lhs) == SSA_NAME)
{
- tree sprime = substitute_and_fold_engine->value_of_expr (lhs, stmt);
+ tree sprime = substitute_and_fold_engine->value_of_stmt (stmt, lhs);
if (sprime
&& sprime != lhs
&& may_propagate_copy (lhs, sprime)