]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
ifconv: Remove unused array predicated
authorAndrew Pinski <quic_apinski@quicinc.com>
Sun, 6 Jul 2025 18:40:44 +0000 (11:40 -0700)
committerAndrew Pinski <quic_apinski@quicinc.com>
Wed, 16 Jul 2025 15:03:09 +0000 (08:03 -0700)
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>
gcc/tree-if-conv.cc

index 636361e7c360674f93009db927ef903c6b423c30..d2b9f9fe080967a313d67b66f2c958b83f0ae954 100644 (file)
@@ -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