From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1011) id 029E13858296; Thu, 16 Jun 2022 18:18:49 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 029E13858296 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Andrew Macleod To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-1135] Propagator should call value_of_stmt. X-Act-Checkin: gcc X-Git-Author: Andrew MacLeod X-Git-Refname: refs/heads/master X-Git-Oldrev: 9642d07c35f14b9917cd115e8a9f0210fbcdcf4f X-Git-Newrev: 5b1594dc2d053803ae98ae39f76fbd71f35cb657 Message-Id: <20220616181849.029E13858296@sourceware.org> Date: Thu, 16 Jun 2022 18:18:49 +0000 (GMT) X-BeenThere: gcc-cvs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jun 2022 18:18:49 -0000 https://gcc.gnu.org/g:5b1594dc2d053803ae98ae39f76fbd71f35cb657 commit r13-1135-g5b1594dc2d053803ae98ae39f76fbd71f35cb657 Author: Andrew MacLeod Date: Thu Mar 31 09:36:59 2022 -0400 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. Diff: --- gcc/tree-ssa-propagate.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/tree-ssa-propagate.cc b/gcc/tree-ssa-propagate.cc index c10ffd91766..5983f029364 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)