public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/57276] New: Waste work in cgraph_edge_brings_all_agg_vals_for_node()
@ 2013-05-14 14:29 pchang9 at cs dot wisc.edu
  2013-05-14 14:33 ` [Bug middle-end/57276] " paolo.carlini at oracle dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: pchang9 at cs dot wisc.edu @ 2013-05-14 14:29 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57276

            Bug ID: 57276
           Summary: Waste work in
                    cgraph_edge_brings_all_agg_vals_for_node()
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pchang9 at cs dot wisc.edu

Created attachment 30111
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30111&action=edit
Suggested patch

The problem appears in version 4.9 and in revision 198887. I have attached
a one-line patch that fixes it.

In method "cgraph_edge_brings_all_agg_vals_for_node()" in ipa-cp.c, the
loop in 3210 should break immediately after "found" is set to "true".
All the iterations after "found" is set to "true" do not perform any
useful work, at best they just set "found" again to "true".


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

* [Bug middle-end/57276] Waste work in cgraph_edge_brings_all_agg_vals_for_node()
  2013-05-14 14:29 [Bug middle-end/57276] New: Waste work in cgraph_edge_brings_all_agg_vals_for_node() pchang9 at cs dot wisc.edu
@ 2013-05-14 14:33 ` paolo.carlini at oracle dot com
  2013-05-14 15:03 ` pchang9 at cs dot wisc.edu
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2013-05-14 14:33 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57276

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> ---
Note that normally patches go to gcc-patches.


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

* [Bug middle-end/57276] Waste work in cgraph_edge_brings_all_agg_vals_for_node()
  2013-05-14 14:29 [Bug middle-end/57276] New: Waste work in cgraph_edge_brings_all_agg_vals_for_node() pchang9 at cs dot wisc.edu
  2013-05-14 14:33 ` [Bug middle-end/57276] " paolo.carlini at oracle dot com
@ 2013-05-14 15:03 ` pchang9 at cs dot wisc.edu
  2013-05-15 15:21 ` jamborm at gcc dot gnu.org
  2013-05-17 21:13 ` jamborm at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: pchang9 at cs dot wisc.edu @ 2013-05-14 15:03 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57276

Po-Chun Chang <pchang9 at cs dot wisc.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|enhancement                 |normal


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

* [Bug middle-end/57276] Waste work in cgraph_edge_brings_all_agg_vals_for_node()
  2013-05-14 14:29 [Bug middle-end/57276] New: Waste work in cgraph_edge_brings_all_agg_vals_for_node() pchang9 at cs dot wisc.edu
  2013-05-14 14:33 ` [Bug middle-end/57276] " paolo.carlini at oracle dot com
  2013-05-14 15:03 ` pchang9 at cs dot wisc.edu
@ 2013-05-15 15:21 ` jamborm at gcc dot gnu.org
  2013-05-17 21:13 ` jamborm at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: jamborm at gcc dot gnu.org @ 2013-05-15 15:21 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57276

Martin Jambor <jamborm at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
                URL|                            |http://gcc.gnu.org/ml/gcc-p
                   |                            |atches/2013-05/msg00846.htm
                   |                            |l
           Assignee|unassigned at gcc dot gnu.org      |jamborm at gcc dot gnu.org

--- Comment #3 from Martin Jambor <jamborm at gcc dot gnu.org> ---
I have tested the patch and submitted it to the mailing list:

http://gcc.gnu.org/ml/gcc-patches/2013-05/msg00846.html

I do not expect any objects and plan to commit it tomorrow.
Thanks a lot for spotting it.


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

* [Bug middle-end/57276] Waste work in cgraph_edge_brings_all_agg_vals_for_node()
  2013-05-14 14:29 [Bug middle-end/57276] New: Waste work in cgraph_edge_brings_all_agg_vals_for_node() pchang9 at cs dot wisc.edu
                   ` (2 preceding siblings ...)
  2013-05-15 15:21 ` jamborm at gcc dot gnu.org
@ 2013-05-17 21:13 ` jamborm at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: jamborm at gcc dot gnu.org @ 2013-05-17 21:13 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57276

Martin Jambor <jamborm at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Martin Jambor <jamborm at gcc dot gnu.org> ---
Author: jamborm
Date: Fri May 17 21:12:34 2013
New Revision: 199035

URL: http://gcc.gnu.org/viewcvs?rev=199035&root=gcc&view=rev
Log:
2013-05-17  Po-Chun Chang  <pchang9@cs.wisc.edu>
        Martin Jambor  <mjambor@suse.cz>

    PR middle-end/57276
    * ipa-cp.c (cgraph_edge_brings_all_agg_vals_for_node): Break when a
    value that corresponds to the given aggval is found in values vector.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/ipa-cp.c


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

end of thread, other threads:[~2013-05-17 21:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-14 14:29 [Bug middle-end/57276] New: Waste work in cgraph_edge_brings_all_agg_vals_for_node() pchang9 at cs dot wisc.edu
2013-05-14 14:33 ` [Bug middle-end/57276] " paolo.carlini at oracle dot com
2013-05-14 15:03 ` pchang9 at cs dot wisc.edu
2013-05-15 15:21 ` jamborm at gcc dot gnu.org
2013-05-17 21:13 ` jamborm 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).