diff options
author | Andrew Pinski <apinski@marvell.com> | 2023-04-08 19:03:38 -0700 |
---|---|---|
committer | Andrew Pinski <apinski@marvell.com> | 2023-04-18 07:39:53 -0700 |
commit | decd9de45064d9c14fa3b153d84ad42573d1b34d (patch) | |
tree | da06d7d5bb84b953ad132f98f42e0314d1d66dcd /gcc/tree-ssa-phiopt.cc | |
parent | 18e78844e78d7096c8e073c5b431480a0b8249d0 (diff) | |
download | gcc-decd9de45064d9c14fa3b153d84ad42573d1b34d.zip gcc-decd9de45064d9c14fa3b153d84ad42573d1b34d.tar.gz gcc-decd9de45064d9c14fa3b153d84ad42573d1b34d.tar.bz2 |
PHIOPT: small cleanup in match_simplify_replacement
We know that the statement we are moving is already
have a SSA_NAME on the lhs so we don't need to
check that and can also just call reset_flow_sensitive_info
with the name we already got.
OK? Bootstrapped and tested on x86_64-linux-gnu with no regressions.
gcc/ChangeLog:
* tree-ssa-phiopt.cc (match_simplify_replacement):
Simplify code that does the movement slightly.
Diffstat (limited to 'gcc/tree-ssa-phiopt.cc')
-rw-r--r-- | gcc/tree-ssa-phiopt.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gcc/tree-ssa-phiopt.cc b/gcc/tree-ssa-phiopt.cc index 16acd2f..4ddb4d5 100644 --- a/gcc/tree-ssa-phiopt.cc +++ b/gcc/tree-ssa-phiopt.cc @@ -1094,11 +1094,10 @@ match_simplify_replacement (basic_block cond_bb, basic_block middle_bb, tree name = gimple_get_lhs (stmt_to_move); // Mark the name to be renamed if there is one. - if (name && TREE_CODE (name) == SSA_NAME) - bitmap_set_bit (inserted_exprs, SSA_NAME_VERSION (name)); + bitmap_set_bit (inserted_exprs, SSA_NAME_VERSION (name)); gimple_stmt_iterator gsi1 = gsi_for_stmt (stmt_to_move); gsi_move_before (&gsi1, &gsi); - reset_flow_sensitive_info (gimple_assign_lhs (stmt_to_move)); + reset_flow_sensitive_info (name); } replace_phi_edge_with_variable (cond_bb, e1, phi, result, inserted_exprs); |