Bug 57782 - Wasted work in remove_path()
Summary: Wasted work in remove_path()
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.9.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-02 16:32 UTC by Po-Chun Chang
Modified: 2013-07-23 15:58 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
Suggested patch (305 bytes, patch)
2013-07-02 16:32 UTC, Po-Chun Chang
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Po-Chun Chang 2013-07-02 16:32:53 UTC
Created attachment 30423 [details]
Suggested patch

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

In method "remove_path()" in cfgloopmanip.c, the loop on line 343 should break immediately after "irred_invalidated" is set to "true". All the iterations after "irred_invalidated" set to "true" do not perform any useful work, at best they just set "irred_invalidated" again to "true".
Comment 1 Po-Chun Chang 2013-07-22 21:59:53 UTC
Patch sent to gcc-patches@

http://gcc.gnu.org/ml/gcc-patches/2013-07/msg00963.html
Comment 2 Jeffrey A. Law 2013-07-23 15:58:53 UTC
Installed onto mainline.