[Bug middle-end/57786] New: Waste work in distribute_notes()

pchang9 at cs dot wisc.edu gcc-bugzilla@gcc.gnu.org
Tue Jul 2 18:42:00 GMT 2013


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

            Bug ID: 57786
           Summary: Waste work in distribute_notes()
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pchang9 at cs dot wisc.edu
                CC: nistor1 at illinois dot edu

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

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

In method "distribute_notes()" in combine.c, the loop on line 13584 should
break immediately after "all_used" is set to 0. All the iterations after
"all_used" set to 0 do not perform any useful work, at best they just set
"all_used" again to 0.



More information about the Gcc-bugs mailing list