aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAndrew Pinski <quic_apinski@quicinc.com>2024-09-19 16:32:50 -0700
committerAndrew Pinski <quic_apinski@quicinc.com>2024-09-20 05:02:37 +0000
commitb2f4daa81b959ad27d161ae5219887a82ffe8069 (patch)
treee2ed9b431bb51eeb438b5a6d176fe5e6f79e458c /gcc
parent284c03ec79ec206786673500b7813bd9f28b0075 (diff)
downloadgcc-b2f4daa81b959ad27d161ae5219887a82ffe8069.zip
gcc-b2f4daa81b959ad27d161ae5219887a82ffe8069.tar.gz
gcc-b2f4daa81b959ad27d161ae5219887a82ffe8069.tar.bz2
Remove PHI_RESULT_PTR and change some PHI_RESULT to be gimple_phi_result [PR116643]
There was only a few uses PHI_RESULT_PTR so lets remove it and use gimple_phi_result_ptr or gimple_phi_result directly instead. Since I was modifying ssa-iterators.h for the use of PHI_RESULT_PTR, change the use of PHI_RESULT there to be gimple_phi_result instead. This also removes one extra indirection that was done for PHI_RESULT so stage2 building should be slightly faster. Bootstrapped and tested on x86_64-linux-gnu. PR middle-end/116643 gcc/ChangeLog: * ssa-iterators.h (single_phi_def): Use gimple_phi_result instead of PHI_RESULT. (op_iter_init_phidef): Use gimple_phi_result/gimple_phi_result_ptr instead of PHI_RESULT/PHI_RESULT_PTR. * tree-ssa-operands.h (PHI_RESULT_PTR): Remove. (PHI_RESULT): Use gimple_phi_result directly. (SET_PHI_RESULT): Use gimple_phi_result_ptr directly. Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ssa-iterators.h6
-rw-r--r--gcc/tree-ssa-operands.h5
2 files changed, 5 insertions, 6 deletions
diff --git a/gcc/ssa-iterators.h b/gcc/ssa-iterators.h
index b7b01fd..e0e555c 100644
--- a/gcc/ssa-iterators.h
+++ b/gcc/ssa-iterators.h
@@ -768,7 +768,7 @@ num_ssa_operands (gimple *stmt, int flags)
inline tree
single_phi_def (gphi *stmt, int flags)
{
- tree def = PHI_RESULT (stmt);
+ tree def = gimple_phi_result (stmt);
if ((flags & SSA_OP_DEF) && is_gimple_reg (def))
return def;
if ((flags & SSA_OP_VIRTUAL_DEFS) && !is_gimple_reg (def))
@@ -811,7 +811,7 @@ op_iter_init_phiuse (ssa_op_iter *ptr, gphi *phi, int flags)
inline def_operand_p
op_iter_init_phidef (ssa_op_iter *ptr, gphi *phi, int flags)
{
- tree phi_def = PHI_RESULT (phi);
+ tree phi_def = gimple_phi_result (phi);
int comp;
clear_and_done_ssa_iter (ptr);
@@ -833,7 +833,7 @@ op_iter_init_phidef (ssa_op_iter *ptr, gphi *phi, int flags)
/* The first call to op_iter_next_def will terminate the iterator since
all the fields are NULL. Simply return the result here as the first and
therefore only result. */
- return PHI_RESULT_PTR (phi);
+ return gimple_phi_result_ptr (phi);
}
/* Return true is IMM has reached the end of the immediate use stmt list. */
diff --git a/gcc/tree-ssa-operands.h b/gcc/tree-ssa-operands.h
index 8072932..b6534f1 100644
--- a/gcc/tree-ssa-operands.h
+++ b/gcc/tree-ssa-operands.h
@@ -72,9 +72,8 @@ struct GTY(()) ssa_operands {
#define USE_OP_PTR(OP) (&((OP)->use_ptr))
#define USE_OP(OP) (USE_FROM_PTR (USE_OP_PTR (OP)))
-#define PHI_RESULT_PTR(PHI) gimple_phi_result_ptr (PHI)
-#define PHI_RESULT(PHI) DEF_FROM_PTR (PHI_RESULT_PTR (PHI))
-#define SET_PHI_RESULT(PHI, V) SET_DEF (PHI_RESULT_PTR (PHI), (V))
+#define PHI_RESULT(PHI) gimple_phi_result (PHI)
+#define SET_PHI_RESULT(PHI, V) SET_DEF (gimple_phi_result_ptr (PHI), (V))
/*
#define PHI_ARG_DEF(PHI, I) USE_FROM_PTR (PHI_ARG_DEF_PTR ((PHI), (I)))
*/