From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1011) id 11CEF38582BF; Thu, 22 Sep 2022 18:48:57 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 11CEF38582BF DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1663872537; bh=JvU2G5jNMcrvF/jtB3MwYVl6Ozz/88zlo3haRJqfOrY=; h=From:To:Subject:Date:From; b=A8gi2Xk1C5BikpB/YO4zWH2ELwwcDlvuCMwLzdk89fGUT4Noe4oyjRm9b8rv8WWeg SnW4GR790dtd/Zx5l7STaAFBnRf2EnNuqTrU3qy36pNUp7pxKCrTYaPsI/sdC5kV35 5mpB6nlQsV8fT3HYxOtYzoTwEPyn3v3FfDT5aelg= 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-2783] Replace another snippet with a call to gimple_range_ssa_names. X-Act-Checkin: gcc X-Git-Author: Andrew MacLeod X-Git-Refname: refs/heads/master X-Git-Oldrev: 12b537b9b7fd50f4b2fbfcb7ccf45f8d66085577 X-Git-Newrev: 3cba5cd6e019182dbff756f621af048d55cdda98 Message-Id: <20220922184857.11CEF38582BF@sourceware.org> Date: Thu, 22 Sep 2022 18:48:57 +0000 (GMT) List-Id: https://gcc.gnu.org/g:3cba5cd6e019182dbff756f621af048d55cdda98 commit r13-2783-g3cba5cd6e019182dbff756f621af048d55cdda98 Author: Andrew MacLeod Date: Wed Aug 31 17:28:09 2022 -0400 Replace another snippet with a call to gimple_range_ssa_names. When the original patch was applied, I missed a spot which could also be rewritten to use gimple_range_ssa_names. * tree-ssa-threadbackward.cc (back_threader::find_paths_to_names): Replace sequence with a call to gimple_range_ssa_names. Diff: --- gcc/tree-ssa-threadbackward.cc | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/gcc/tree-ssa-threadbackward.cc b/gcc/tree-ssa-threadbackward.cc index 9725f50e639..2a8cfa3ee01 100644 --- a/gcc/tree-ssa-threadbackward.cc +++ b/gcc/tree-ssa-threadbackward.cc @@ -435,28 +435,14 @@ back_threader::find_paths_to_names (basic_block bb, bitmap interesting, } /* For other local defs process their uses, amending imports on the way. */ - else if (gassign *ass = dyn_cast (def_stmt)) + else { tree ssa[3]; - if (range_op_handler (ass)) - { - ssa[0] = gimple_range_ssa_p (gimple_range_operand1 (ass)); - ssa[1] = gimple_range_ssa_p (gimple_range_operand2 (ass)); - ssa[2] = NULL_TREE; - } - else if (gimple_assign_rhs_code (ass) == COND_EXPR) - { - ssa[0] = gimple_range_ssa_p (gimple_assign_rhs1 (ass)); - ssa[1] = gimple_range_ssa_p (gimple_assign_rhs2 (ass)); - ssa[2] = gimple_range_ssa_p (gimple_assign_rhs3 (ass)); - } - else - continue; - for (unsigned j = 0; j < 3; ++j) + unsigned lim = gimple_range_ssa_names (ssa, 3, def_stmt); + for (unsigned j = 0; j < lim; ++j) { tree rhs = ssa[j]; if (rhs - && TREE_CODE (rhs) == SSA_NAME && bitmap_set_bit (m_imports, SSA_NAME_VERSION (rhs))) {