aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAndrew Pinski <quic_apinski@quicinc.com>2025-07-06 11:40:44 -0700
committerAndrew Pinski <quic_apinski@quicinc.com>2025-07-16 08:03:09 -0700
commitf8563adf99468f61a21fdb447c96f71733310d9d (patch)
treec7ed973b74d8dc99b784e6ce7c8159b292383a1e /gcc
parent39ba01fe70c77e70a00ed65a1e6bac8350479f4d (diff)
downloadgcc-f8563adf99468f61a21fdb447c96f71733310d9d.zip
gcc-f8563adf99468f61a21fdb447c96f71733310d9d.tar.gz
gcc-f8563adf99468f61a21fdb447c96f71733310d9d.tar.bz2
ifconv: Remove unused array predicated
While starting to improve if-conv, I noticed that predicated was only being set once inside a loop and accessed right below. This became this way due to r14-8869-g8636c538b68068 and before it was needed since it was accessed via 2 loops but now it is only set and then accessed in the next statement, there is no reason for it being there. So let's remove it and just use the value from it instead. Bootstrapped and tested on x86_64-linux-gnu. gcc/ChangeLog: * tree-if-conv.cc (combine_blocks): Remove predicated dynamic array. Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
Diffstat (limited to 'gcc')
-rw-r--r--gcc/tree-if-conv.cc5
1 files changed, 1 insertions, 4 deletions
diff --git a/gcc/tree-if-conv.cc b/gcc/tree-if-conv.cc
index 636361e..d2b9f9f 100644
--- a/gcc/tree-if-conv.cc
+++ b/gcc/tree-if-conv.cc
@@ -3004,12 +3004,10 @@ combine_blocks (class loop *loop, bool loop_versioned)
/* Reset flow-sensitive info before predicating stmts or PHIs we
might fold. */
- bool *predicated = XNEWVEC (bool, orig_loop_num_nodes);
for (i = 0; i < orig_loop_num_nodes; i++)
{
bb = ifc_bbs[i];
- predicated[i] = is_predicated (bb);
- if (predicated[i])
+ if (is_predicated (bb))
{
for (auto gsi = gsi_start_phis (bb);
!gsi_end_p (gsi); gsi_next (&gsi))
@@ -3211,7 +3209,6 @@ combine_blocks (class loop *loop, bool loop_versioned)
free (ifc_bbs);
ifc_bbs = NULL;
- free (predicated);
}
/* Version LOOP before if-converting it; the original loop