From patchwork Sat Oct 27 22:07:43 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Bosscher X-Patchwork-Id: 194635 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id A0A0D2C0092 for ; Sun, 28 Oct 2012 09:08:16 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1351980497; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: MIME-Version:Received:In-Reply-To:References:From:Date: Message-ID:Subject:To:Cc:Content-Type:Mailing-List:Precedence: List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender: Delivered-To; bh=pmnWjxCBxuU380Vh9p8PbMNBIOY=; b=LNOq6J1rXG2/8/2 5b7RN0KN/E0p2SnNxTWBaWH2xeBkElmtq2Q9GuZGVU9pDIvSIZtoVbd0joZHmQJG 65WVMrZEFvYVpNeSEFSQZ8C1GeQHwMxr92mAFUxgZd2gVQKTMSgj8RQlWDbWCDxB pbCuY75OOEHZzs5EOOwSp2Q9Byao= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:MIME-Version:Received:In-Reply-To:References:From:Date:Message-ID:Subject:To:Cc:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=QVc14s8TyqznXCwx/W5APYCDNQH/6Ui9vQqNazsXAjlcuz2A4DZA9EmRjQ35Ci 33EN7flBJFdxmLVcPfkUGMXn1tUxD4P5ZSiQd2uSYxA8GldLtm5FOzj+Pyagggh4 D+VYhiQjfqqCcZNgb+U8wfrIaBFWPJ1Qjr0gAoSuVvJOY=; Received: (qmail 20112 invoked by alias); 27 Oct 2012 22:08:13 -0000 Received: (qmail 20101 invoked by uid 22791); 27 Oct 2012 22:08:12 -0000 X-SWARE-Spam-Status: No, hits=-5.1 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, KHOP_RCVD_TRUST, KHOP_THREADED, RCVD_IN_DNSWL_LOW, RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-lb0-f175.google.com (HELO mail-lb0-f175.google.com) (209.85.217.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 27 Oct 2012 22:08:05 +0000 Received: by mail-lb0-f175.google.com with SMTP id y2so2437727lbk.20 for ; Sat, 27 Oct 2012 15:08:03 -0700 (PDT) Received: by 10.152.108.42 with SMTP id hh10mr23353101lab.4.1351375683795; Sat, 27 Oct 2012 15:08:03 -0700 (PDT) MIME-Version: 1.0 Received: by 10.112.88.99 with HTTP; Sat, 27 Oct 2012 15:07:43 -0700 (PDT) In-Reply-To: References: <507984E2.4090300@redhat.com> <5079D945.8080703@redhat.com> From: Steven Bosscher Date: Sun, 28 Oct 2012 00:07:43 +0200 Message-ID: Subject: Re: [PR38711] Use DF_LIVE in IRA if it available (for -O2 and higher) To: Vladimir Makarov Cc: GCC Patches , "F. Kenneth Zadeck" X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org On Sat, Oct 27, 2012 at 11:49 PM, Steven Bosscher wrote: > So I'm going to revert this patch. Or actually better, this lighter-weight patch. Will commit after the usual testing. * ira.c (ira): Remove DF_LIVE if the problem is in the stack. (do_reload): Add it back at the end. Index: ira.c =================================================================== --- ira.c (revision 192878) +++ ira.c (working copy) @@ -4399,6 +4399,16 @@ ira (FILE *f) setup_prohibited_mode_move_regs (); df_note_add_problem (); + + /* DF_LIVE can't be used in the register allocator, too many other + parts of the compiler depend on using the "classic" liveness + interpretation of the DF_LR problem. See PR38711. + Remove the problem, so that we don't spend time updating it in + any of the df_analyze() calls during IRA/LRA. */ + if (optimize > 1) + df_remove_problem (df_live); + gcc_checking_assert (df_live == NULL); + #ifdef ENABLE_CHECKING df->changeable_flags |= DF_VERIFY_SCHEDULED; #endif @@ -4678,6 +4688,12 @@ do_reload (void) df_scan_alloc (NULL); df_scan_blocks (); + if (optimize > 1) + { + df_live_add_problem (); + df_live_set_all_dirty (); + } + if (optimize) df_analyze ();