]> gcc.gnu.org Git - gcc.git/commitdiff
Remove m_nloops field from loop_versioning
authorAndrew Pinski <quic_apinski@quicinc.com>
Sun, 28 Apr 2024 01:54:43 +0000 (18:54 -0700)
committerAndrew Pinski <quic_apinski@quicinc.com>
Sun, 5 May 2024 00:25:05 +0000 (17:25 -0700)
This is a small cleanup of loop_versioning where m_nloops
is only used in the constructor so we can remove the whole
field.

Bootstrapped and tested on x86_64-linux-gnu.

gcc/ChangeLog:

* gimple-loop-versioning.cc (loop_versioning): Remove m_nloops field.
(loop_versioning::loop_versioning): Remove initialization of
m_nloops field and move it to be a local variable.
(loop_versioning::analyze_blocks): Fix formating.

Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
gcc/gimple-loop-versioning.cc

index 17877f06921a7f5c171e9d095a976e1d96a47b2f..adea207659bee816fd9d062884b3a57442d90877 100644 (file)
@@ -322,9 +322,6 @@ private:
   /* An obstack to use for general allocation.  */
   obstack m_obstack;
 
-  /* The number of loops in the function.  */
-  unsigned int m_nloops;
-
   /* The total number of loop version conditions we've found.  */
   unsigned int m_num_conditions;
 
@@ -525,10 +522,10 @@ loop_versioning::name_prop::value_of_expr (tree val, gimple *)
 
 loop_versioning::loop_versioning (function *fn)
   : m_fn (fn),
-    m_nloops (number_of_loops (fn)),
     m_num_conditions (0),
     m_address_table (31)
 {
+  unsigned m_nloops = number_of_loops (fn);
   bitmap_obstack_initialize (&m_bitmap_obstack);
   gcc_obstack_init (&m_obstack);
 
@@ -1437,7 +1434,7 @@ loop_versioning::analyze_blocks ()
              {
                linfo.rejected_p = true;
                break;
-           }
+             }
 
          if (!linfo.rejected_p)
            {
This page took 0.060043 seconds and 5 git commands to generate.