public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [tree-ssa-loop] Remove redundant check for number of loops in pass_vectorize::execute
@ 2021-11-08 11:05 Prathamesh Kulkarni
  2021-11-08 11:11 ` Richard Biener
  0 siblings, 1 reply; 4+ messages in thread
From: Prathamesh Kulkarni @ 2021-11-08 11:05 UTC (permalink / raw)
  To: gcc Patches

[-- Attachment #1: Type: text/plain, Size: 379 bytes --]

Hi,
The attached patch removes redundant check for number of loops in
pass_vectorize::execute,
since it only calls vectorize_loops, and in vectorize_loops, we
immediately bail out if no loops are present:
  vect_loops_num = number_of_loops (cfun);
  /* Bail out if there are no loops.  */
  if (vect_loops_num <= 1)
    return 0;

Is the patch OK to commit ?

Thanks,
Prathamesh

[-- Attachment #2: foo.txt --]
[-- Type: text/plain, Size: 318 bytes --]

diff --git a/gcc/tree-ssa-loop.c b/gcc/tree-ssa-loop.c
index 1bbf2f1fb2c..d10e2dc0d54 100644
--- a/gcc/tree-ssa-loop.c
+++ b/gcc/tree-ssa-loop.c
@@ -407,9 +407,6 @@ public:
 unsigned int
 pass_vectorize::execute (function *fun)
 {
-  if (number_of_loops (fun) <= 1)
-    return 0;
-
   return vectorize_loops ();
 }
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-11-09  7:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-08 11:05 [tree-ssa-loop] Remove redundant check for number of loops in pass_vectorize::execute Prathamesh Kulkarni
2021-11-08 11:11 ` Richard Biener
2021-11-09  6:34   ` Prathamesh Kulkarni
2021-11-09  7:17     ` Richard Biener

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).