From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30945 invoked by alias); 15 Feb 2013 10:21:31 -0000 Received: (qmail 30544 invoked by uid 48); 15 Feb 2013 10:20:54 -0000 From: "steven at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/56339] [4.8 Regression]: Suboptimal register allocation Date: Fri, 15 Feb 2013 10:21:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Keywords: missed-optimization, ra X-Bugzilla-Severity: normal X-Bugzilla-Who: steven at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.8.0 X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2013-02/txt/msg01561.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56339 --- Comment #4 from Steven Bosscher 2013-02-15 10:20:52 UTC --- Perhaps for regmove IRA classes should be set up unconditionally: Index: regmove.c =================================================================== --- regmove.c (revision 196074) +++ regmove.c (working copy) @@ -1234,8 +1234,9 @@ regmove_optimize (void) regstat_init_n_sets_and_refs (); regstat_compute_ri (); - if (flag_ira_loop_pressure) - ira_set_pseudo_classes (true, dump_file); + /* Set up register classes for pseudos, so that reg_preferred_class + returns a more useful result. */ + ira_set_pseudo_classes (true, dump_file); regno_src_regno = XNEWVEC (int, nregs); for (i = nregs; --i >= 0; ) @@ -1256,8 +1257,7 @@ regmove_optimize (void) } regstat_free_n_sets_and_refs (); regstat_free_ri (); - if (flag_ira_loop_pressure) - free_reg_info (); + free_reg_info (); return 0; }