From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7073 invoked by alias); 31 May 2013 13:55:06 -0000 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 Received: (qmail 6618 invoked by uid 48); 31 May 2013 13:55:02 -0000 From: "vmakarov at redhat dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/57462] ira-costs considers only a single register at a time Date: Fri, 31 May 2013 13:55: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-Version: 4.8.0 X-Bugzilla-Keywords: missed-optimization, ra X-Bugzilla-Severity: normal X-Bugzilla-Who: vmakarov at redhat dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2013-05/txt/msg02261.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57462 Vladimir Makarov changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |vmakarov at redhat dot com --- Comment #1 from Vladimir Makarov --- Thanks for the analysis. That would be an interesting problem to solve. Although I don't know when I could start work on the problem. The code you are mentioning is actually adaptation of code from old regclass pass which existed since day 1 of GCC. The optimal solution of the problem might be NP-complete (I am not sure about it, but at least long time ago I tried to describe it by ILP). I should say that even the current cost code is very expensive and speeding up is on my list to do. Better solution (through better heuristics) probably will be even more expensive. IMHO, it is also GCC specific problem because GCC postpones code selection (usually compilers do complete code selection before RA, e.g. selecting insn for add in this case) and that is a consequence of GCC machine description model. Doing complete code selection before RA is also challenging task. In any case, the problem is known and quite interesting. There are a lot of different approaches to solve it (some require even GCC architectural changes), none of them are easy. So I don't think, the problem will be solved soon. Sorry.