diff options
author | Aldy Hernandez <aldyh@redhat.com> | 2022-08-18 01:05:08 +0200 |
---|---|---|
committer | Aldy Hernandez <aldyh@redhat.com> | 2022-08-18 09:25:35 +0200 |
commit | 4645ce0d00b8e19ea4bbfcd0cef37e91dea3c9f4 (patch) | |
tree | e9267f334918c92ffc079ddec932dc0a7c6448b5 /gcc | |
parent | 3496ca4e6566fc3c5f1093a0290bb88c34d368f8 (diff) | |
download | gcc-4645ce0d00b8e19ea4bbfcd0cef37e91dea3c9f4.zip gcc-4645ce0d00b8e19ea4bbfcd0cef37e91dea3c9f4.tar.gz gcc-4645ce0d00b8e19ea4bbfcd0cef37e91dea3c9f4.tar.bz2 |
Use gimple_range_ssa_names in path_range_query.
gcc/ChangeLog:
* gimple-range-path.cc
(path_range_query::compute_exit_dependencies): Use
gimple_range_ssa_names.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/gimple-range-path.cc | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/gcc/gimple-range-path.cc b/gcc/gimple-range-path.cc index 73e248b..ff991b7 100644 --- a/gcc/gimple-range-path.cc +++ b/gcc/gimple-range-path.cc @@ -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. |