* [PATCH] Remove m_nloops field from loop_versioning
@ 2024-04-27 5:25 Andrew Pinski
2024-04-29 15:22 ` Jeff Law
0 siblings, 1 reply; 2+ messages in thread
From: Andrew Pinski @ 2024-04-27 5:25 UTC (permalink / raw)
To: gcc-patches; +Cc: Andrew Pinski
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.
---
gcc/gimple-loop-versioning.cc | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/gcc/gimple-loop-versioning.cc b/gcc/gimple-loop-versioning.cc
index 17877f06921..adea207659b 100644
--- a/gcc/gimple-loop-versioning.cc
+++ b/gcc/gimple-loop-versioning.cc
@@ -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)
{
--
2.43.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Remove m_nloops field from loop_versioning
2024-04-27 5:25 [PATCH] Remove m_nloops field from loop_versioning Andrew Pinski
@ 2024-04-29 15:22 ` Jeff Law
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Law @ 2024-04-29 15:22 UTC (permalink / raw)
To: Andrew Pinski, gcc-patches
On 4/26/24 11:25 PM, Andrew Pinski wrote:
> 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.
OK. But consider holding off on the commit for a bit to make
cherry-picking to the release branch easier.
jeff
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-04-29 15:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-27 5:25 [PATCH] Remove m_nloops field from loop_versioning Andrew Pinski
2024-04-29 15:22 ` Jeff Law
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).