From patchwork Fri Sep 28 19:23:58 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Steven Bosscher X-Patchwork-Id: 187892 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 9F4F22C00BC for ; Sat, 29 Sep 2012 05:24:30 +1000 (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=1349465070; 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:Content-Transfer-Encoding: Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:Sender:Delivered-To; bh=HYS2PS7bBHkxETHzlSl8 V+cgEy8=; b=Oqj6+tN0MaXdOpc9T1EXBY832uT+w8/WhR7vftFtNFfjqAJ3ffX6 xxWHi9EMn4hum4pBzNcD7nX1vRJSL3/OLO9h4TjxSEahPDNZCuUxbGZZc125iOMN VZ1K51AjJmoFrs9Je1A/LrIzaedTJHNrp9kMHBLuU3syuBFgdCZQRDs= 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:Content-Transfer-Encoding:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=lYlfyt1nfXTt6v14tWwR15CwRbPKJFp39gWL0gP8uOW8VEsE4YryZGCbyty4eK ztjg0k07KvQtO3AqFBp/KawIURNnlCIQgl4ZKQYVJHKbS5Gz6H1wPGMKoMCvlx8x ikJ6JSBS/Pgctr4wa8hq3K6rEbgb7o7hm+g96c1LbuQuI=; Received: (qmail 32333 invoked by alias); 28 Sep 2012 19:24:27 -0000 Received: (qmail 32323 invoked by uid 22791); 28 Sep 2012 19:24:26 -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; Fri, 28 Sep 2012 19:24:20 +0000 Received: by lbky2 with SMTP id y2so2440797lbk.20 for ; Fri, 28 Sep 2012 12:24:18 -0700 (PDT) Received: by 10.112.37.66 with SMTP id w2mr3026926lbj.124.1348860258537; Fri, 28 Sep 2012 12:24:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.112.39.229 with HTTP; Fri, 28 Sep 2012 12:23:58 -0700 (PDT) In-Reply-To: <5065C066.4040600@redhat.com> References: <5064D9AD.5070504@redhat.com> <5065C066.4040600@redhat.com> From: Steven Bosscher Date: Fri, 28 Sep 2012 21:23:58 +0200 Message-ID: Subject: Re: RFC: LRA for x86/x86-64 [0/9] To: Vladimir Makarov Cc: GCC Patches 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 Fri, Sep 28, 2012 at 5:21 PM, Vladimir Makarov wrote: > On 12-09-28 4:21 AM, Steven Bosscher wrote: >> >> On Fri, Sep 28, 2012 at 12:56 AM, Vladimir Makarov >> wrote: >>> >>> Any comments and proposals are appreciated. Even if GCC community >>> decides that it is too late to submit it to gcc4.8, the earlier reviews >>> are always useful. >> >> I would like to see some benchmark numbers, both for code quality and >> compile time impact for the most notorious compile time hog PRs for >> large routines where IRA performs poorly (e.g. PR54146, PR26854). >> >> > I should look at this, Steven. Unfortunately, the compiler @ trunk (without > my patch) crashes on PR54156: > > ../../../trunk2/slow.cc: In function ‘void check_() [with NT = CGAL::Gmpfi; > int s = 3]’: > ../../../trunk2/slow.cc:95489:6: internal compiler error: Segmentation fault > void check_(){ > ^ > 0x888adf crash_signal > /home/vmakarov/build1/trunk/gcc/gcc/toplev.c:335 > 0x8f4718 gimple_code > /home/vmakarov/build1/trunk/gcc/gcc/gimple.h:1126 > 0x8f4718 gimple_nop_p > /home/vmakarov/build1/trunk/gcc/gcc/gimple.h:4851 > 0x8f4718 walk_aliased_vdefs_1 > /home/vmakarov/build1/trunk/gcc/gcc/tree-ssa-alias.c:2204 > 0x8f50ed walk_aliased_vdefs(ao_ref_s*, tree_node*, bool (*)(ao_ref_s*, > tree_node*, void*), void*, bitmap_head_def**) > /home/vmakarov/build1/trunk/gcc/gcc/tree-ssa-alias.c:2240 > 0x9018b5 propagate_necessity > /home/vmakarov/build1/trunk/gcc/gcc/tree-ssa-dce.c:909 > 0x9027b3 perform_tree_ssa_dce > /home/vmakarov/build1/trunk/gcc/gcc/tree-ssa-dce.c:1584 > Please submit a full bug report, > with preprocessed source if appropriate. > Please include the complete backtrace with any bug report. > See for instructions. Works for me on gcc17 at r191835, with a gcc configured like so: "../trunk/configure --with-mpfr=/opt/cfarm/mpfr-latest --with-gmp=/opt/cfarm/gmp-latest --with-mpc=/opt/cfarm/mpc-latest --with-isl=/opt/cfarm/isl-latest --with-cloog=/opt/cfarm/cloog-latest --enable-languages=c,c++ --disable-bootstrap --enable-checking=release --with-gnu-as --with-gnu-ld --with-as=/opt/cfarm/binutils-latest/bin/as --with-ld=/opt/cfarm/binutils-latest/bin/ld" Top 10 time consumers: integrated_RA 191.66 df_live&initialized_regs 73.43 df_live_regs 72.25 out_of_ssa 45.21 tree_PTA 35.44 tree_SSA_incremental 26.53 remove_unused_locals 18.78 combiner 16.54 dominance_computation 14.44 register_information 14.20 TOTAL : 732.10 Note I'm using the simplified test case, see comment #14 in the PR. You can just take the original test case (http://gcc.gnu.org/bugzilla/attachment.cgi?id=27912) and apply this patch: You can compile the test case with: "./xgcc -B. -S -std=gnu++11 -O1 -frounding-math -ftime-report slow.cc" Even with this path, the test case really is a great scalability challange for the compiler :-) I never got the full test case to work at -O1, and the simpler test case still blows up the compiler at -O2 and higher. At -O1 you need a machine with at least 8GB of memory. More than half of that is for IRA+reload... Ciao! Steven --- slow.cc.orig 2012-09-28 21:07:58.000000000 +0200 +++ slow.cc 2012-09-28 21:08:38.000000000 +0200 @@ -95503,6 +95503,7 @@ check_(); } int main(){ +#if 0 { typedef CGAL::Interval_nt I1; I1::Protector p1; @@ -95517,11 +95518,14 @@ check(); check(); check(); +#endif check(); +#if 0 check >(); check >(); check(); check(); check(); check(); +#endif }