This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug middle-end/57789] New: Waste work in repo_emit_p()


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

            Bug ID: 57789
           Summary: Waste work in repo_emit_p()
           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 30428
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=30428&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 "repo_emit_p()" in repo.c, the loop on line 342 should break
immediately after "emit_p" is set to 1. All the iterations after "emit_p" set
to 1 do not perform any useful work, at best they just set "emit_p" again to 1.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]