]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Use gimple_range_ssa_names in path_range_query.
authorAldy Hernandez <aldyh@redhat.com>
Wed, 17 Aug 2022 23:05:08 +0000 (01:05 +0200)
committerAldy Hernandez <aldyh@redhat.com>
Thu, 18 Aug 2022 07:25:35 +0000 (09:25 +0200)
gcc/ChangeLog:

* gimple-range-path.cc
(path_range_query::compute_exit_dependencies): Use
gimple_range_ssa_names.

gcc/gimple-range-path.cc

index 73e248b7e0be1ea9e1976d4fc27af094c4fcf1b4..ff991b7ae1b03621de095bf17f5d79fa8bca3af4 100644 (file)
@@ -557,26 +557,10 @@ path_range_query::compute_exit_dependencies (bitmap dependencies,
       else if (gassign *ass = dyn_cast <gassign *> (def_stmt))
        {
          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)
-           {
-             tree rhs = ssa[j];
-             if (rhs && add_to_exit_dependencies (rhs, dependencies))
-               worklist.safe_push (rhs);
-           }
+         unsigned count = gimple_range_ssa_names (ssa, 3, ass);
+         for (unsigned j = 0; j < count; ++j)
+           if (add_to_exit_dependencies (ssa[j], dependencies))
+             worklist.safe_push (ssa[j]);
        }
     }
   // Exported booleans along the path, may help conditionals.