[gcc r12-564] phiopt: Use gphi *phi instead of gimple *phi some more
Jakub Jelinek
jakub@gcc.gnu.org
Thu May 6 12:05:46 GMT 2021
https://gcc.gnu.org/g:cfd65e8d5299a7cf7d2ecd92b0e24ea4cfb697d9
commit r12-564-gcfd65e8d5299a7cf7d2ecd92b0e24ea4cfb697d9
Author: Jakub Jelinek <jakub@redhat.com>
Date: Thu May 6 14:05:06 2021 +0200
phiopt: Use gphi *phi instead of gimple *phi some more
Various functions in phiopt are also called with a gphi * but use
gimple * argument for it.
2021-05-06 Jakub Jelinek <jakub@redhat.com>
* tree-ssa-phiopt.c (value_replacement, minmax_replacement,
abs_replacement, xor_replacement,
cond_removal_in_popcount_clz_ctz_pattern,
replace_phi_edge_with_variable): Change type of phi argument from
gimple * to gphi *.
Diff:
---
gcc/tree-ssa-phiopt.c | 26 ++++++++++++--------------
1 file changed, 12 insertions(+), 14 deletions(-)
diff --git a/gcc/tree-ssa-phiopt.c b/gcc/tree-ssa-phiopt.c
index 223dac1a873..e0a41d41fba 100644
--- a/gcc/tree-ssa-phiopt.c
+++ b/gcc/tree-ssa-phiopt.c
@@ -57,23 +57,23 @@ static bool conditional_replacement (basic_block, basic_block,
static gphi *factor_out_conditional_conversion (edge, edge, gphi *, tree, tree,
gimple *);
static int value_replacement (basic_block, basic_block,
- edge, edge, gimple *, tree, tree);
+ edge, edge, gphi *, tree, tree);
static bool minmax_replacement (basic_block, basic_block,
- edge, edge, gimple *, tree, tree);
+ edge, edge, gphi *, tree, tree);
static bool abs_replacement (basic_block, basic_block,
- edge, edge, gimple *, tree, tree);
+ edge, edge, gphi *, tree, tree);
static bool xor_replacement (basic_block, basic_block,
- edge, edge, gimple *, tree, tree);
+ edge, edge, gphi *, tree, tree);
static bool spaceship_replacement (basic_block, basic_block,
edge, edge, gphi *, tree, tree);
static bool cond_removal_in_popcount_clz_ctz_pattern (basic_block, basic_block,
- edge, edge, gimple *,
+ edge, edge, gphi *,
tree, tree);
static bool cond_store_replacement (basic_block, basic_block, edge, edge,
hash_set<tree> *);
static bool cond_if_else_store_replacement (basic_block, basic_block, basic_block);
static hash_set<tree> * get_non_trapping ();
-static void replace_phi_edge_with_variable (basic_block, edge, gimple *, tree);
+static void replace_phi_edge_with_variable (basic_block, edge, gphi *, tree);
static void hoist_adjacent_loads (basic_block, basic_block,
basic_block, basic_block);
static bool gate_hoist_loads (void);
@@ -389,7 +389,7 @@ tree_ssa_phiopt_worker (bool do_store_elim, bool do_hoist_loads, bool early_p)
static void
replace_phi_edge_with_variable (basic_block cond_block,
- edge e, gimple *phi, tree new_tree)
+ edge e, gphi *phi, tree new_tree)
{
basic_block bb = gimple_bb (phi);
basic_block block_to_remove;
@@ -1113,8 +1113,7 @@ absorbing_element_p (tree_code code, tree arg, bool right, tree rval)
static int
value_replacement (basic_block cond_bb, basic_block middle_bb,
- edge e0, edge e1, gimple *phi,
- tree arg0, tree arg1)
+ edge e0, edge e1, gphi *phi, tree arg0, tree arg1)
{
gimple_stmt_iterator gsi;
gimple *cond;
@@ -1422,8 +1421,7 @@ value_replacement (basic_block cond_bb, basic_block middle_bb,
static bool
minmax_replacement (basic_block cond_bb, basic_block middle_bb,
- edge e0, edge e1, gimple *phi,
- tree arg0, tree arg1)
+ edge e0, edge e1, gphi *phi, tree arg0, tree arg1)
{
tree result;
edge true_edge, false_edge;
@@ -2267,7 +2265,7 @@ spaceship_replacement (basic_block cond_bb, basic_block middle_bb,
static bool
cond_removal_in_popcount_clz_ctz_pattern (basic_block cond_bb,
basic_block middle_bb,
- edge e1, edge e2, gimple *phi,
+ edge e1, edge e2, gphi *phi,
tree arg0, tree arg1)
{
gimple *cond;
@@ -2425,7 +2423,7 @@ cond_removal_in_popcount_clz_ctz_pattern (basic_block cond_bb,
static bool
abs_replacement (basic_block cond_bb, basic_block middle_bb,
edge e0 ATTRIBUTE_UNUSED, edge e1,
- gimple *phi, tree arg0, tree arg1)
+ gphi *phi, tree arg0, tree arg1)
{
tree result;
gassign *new_stmt;
@@ -2549,7 +2547,7 @@ abs_replacement (basic_block cond_bb, basic_block middle_bb,
static bool
xor_replacement (basic_block cond_bb, basic_block middle_bb,
edge e0 ATTRIBUTE_UNUSED, edge e1,
- gimple *phi, tree arg0, tree arg1)
+ gphi *phi, tree arg0, tree arg1)
{
if (!INTEGRAL_TYPE_P (TREE_TYPE (arg1)))
return false;
More information about the Gcc-cvs
mailing list