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

Reply via email to