public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/65488] New: parloops runs for functions it doesn't process
@ 2015-03-20 10:01 vries at gcc dot gnu.org
  2015-03-20 10:14 ` [Bug tree-optimization/65488] " vries at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: vries at gcc dot gnu.org @ 2015-03-20 10:01 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65488

            Bug ID: 65488
           Summary: parloops runs for functions it doesn't process
           Product: gcc
           Version: 5.0
            Status: UNCONFIRMED
          Severity: trivial
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vries at gcc dot gnu.org

parloops has a gate function to decide when to run.

However, there are also a bunch of early-out tests outside the gate that also
act as a gate:
- !parallelized_function_p (fun->decl)
- !fun->has_nonlocal_label
- number_of_loops (fun) > 1)

For the functions where the gate passes, but the early-out test fail, the pass
is not really run, but we still do the whole pass setup and dump the function
to dump_file.


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

* [Bug tree-optimization/65488] parloops runs for functions it doesn't process
  2015-03-20 10:01 [Bug tree-optimization/65488] New: parloops runs for functions it doesn't process vries at gcc dot gnu.org
@ 2015-03-20 10:14 ` vries at gcc dot gnu.org
  2015-03-20 10:17 ` vries at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: vries at gcc dot gnu.org @ 2015-03-20 10:14 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65488

--- Comment #1 from vries at gcc dot gnu.org ---
After committing the fix for PR65487, moving !parallelized_function_p
(fun->decl) and !fun->has_nonlocal_label to the gate function doesn't give any
interference anymore with -fdump-passes.

In order to move (number_of_loops (fun) > 1) to the gate function without
changing fdump-passes output, we need to add a dummy loop to the dummy function
used as context in pass_manager::dump_passes ().


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

* [Bug tree-optimization/65488] parloops runs for functions it doesn't process
  2015-03-20 10:01 [Bug tree-optimization/65488] New: parloops runs for functions it doesn't process vries at gcc dot gnu.org
  2015-03-20 10:14 ` [Bug tree-optimization/65488] " vries at gcc dot gnu.org
@ 2015-03-20 10:17 ` vries at gcc dot gnu.org
  2015-06-14  8:57 ` vries at gcc dot gnu.org
  2015-08-29  6:50 ` vries at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: vries at gcc dot gnu.org @ 2015-03-20 10:17 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65488

--- Comment #2 from vries at gcc dot gnu.org ---
Another way of dealing with this is to add a TODO_nodump or TODO_earlyout:
...
@@ -2395,7 +2408,7 @@ unsigned
 pass_parallelize_loops::execute (function *fun)
 {
   if (number_of_loops (fun) <= 1)
-    return 0;
+    return TODO_earlyout;

   if (parallelize_loops ())
     {
...
and handle that appropriately in the pass manager.


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

* [Bug tree-optimization/65488] parloops runs for functions it doesn't process
  2015-03-20 10:01 [Bug tree-optimization/65488] New: parloops runs for functions it doesn't process vries at gcc dot gnu.org
  2015-03-20 10:14 ` [Bug tree-optimization/65488] " vries at gcc dot gnu.org
  2015-03-20 10:17 ` vries at gcc dot gnu.org
@ 2015-06-14  8:57 ` vries at gcc dot gnu.org
  2015-08-29  6:50 ` vries at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: vries at gcc dot gnu.org @ 2015-06-14  8:57 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65488

vries at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch

--- Comment #3 from vries at gcc dot gnu.org ---
https://gcc.gnu.org/ml/gcc-patches/2015-06/msg00971.html


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

* [Bug tree-optimization/65488] parloops runs for functions it doesn't process
  2015-03-20 10:01 [Bug tree-optimization/65488] New: parloops runs for functions it doesn't process vries at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2015-06-14  8:57 ` vries at gcc dot gnu.org
@ 2015-08-29  6:50 ` vries at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: vries at gcc dot gnu.org @ 2015-08-29  6:50 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65488

vries at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|patch                       |

--- Comment #4 from vries at gcc dot gnu.org ---
Given the discussion, retracting patch.


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

end of thread, other threads:[~2015-08-29  6:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-20 10:01 [Bug tree-optimization/65488] New: parloops runs for functions it doesn't process vries at gcc dot gnu.org
2015-03-20 10:14 ` [Bug tree-optimization/65488] " vries at gcc dot gnu.org
2015-03-20 10:17 ` vries at gcc dot gnu.org
2015-06-14  8:57 ` vries at gcc dot gnu.org
2015-08-29  6:50 ` vries at gcc dot gnu.org

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