From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7993 invoked by alias); 6 Mar 2015 17:02:53 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 7980 invoked by uid 89); 6 Mar 2015 17:02:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 06 Mar 2015 17:02:51 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t26H2n1F010550 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 6 Mar 2015 12:02:50 -0500 Received: from [10.3.113.56] (ovpn-113-56.phx2.redhat.com [10.3.113.56]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t26H2mut013811; Fri, 6 Mar 2015 12:02:49 -0500 Message-ID: <54F9DDB8.9030300@redhat.com> Date: Fri, 06 Mar 2015 17:02:00 -0000 From: Jeff Law User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Richard Biener , gcc-patches@gcc.gnu.org Subject: Re: [PATCH][RFC] Fix PR63155 References: In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-03/txt/msg00382.txt.bz2 On 03/06/15 06:16, Richard Biener wrote: > > This fixes PR63155 and reduces the memory usage at -O0 from reported > 10GB (couldn't verify/update on my small box) to 350MB (still worse > compared to 4.8 which needs only 50MB). > > It fixes this by no longer computing live info or building a conflict > graph for coalescing of SSA names flowing over abnormal edges > (which needs to succeed). > > Of course this also removes verification that this coalescing is valid > (but computing this has quadratic cost). With this it turns > ICEs into miscompiles. > > We could restrict verifying that we can perform abnormal coalescing > to ENABLE_CHECKING (and I've wanted a verifier pass that can verify > this multiple times to be able to catch what breaks it and not having > to work back from out-of-SSA ICEing...). > > So any opinion on this patch welcome. > > Bootstrap and regtest running on x86_64-unknown-linux-gnu. > > Ok for trunk? ;) > > Thanks, > Richard. > > 2015-03-06 Richard Biener > > PR middle-end/63155 > * tree-ssa-coalesce.c (attempt_coalesce): Handle graph being NULL. > (coalesce_partitions): Split out abnormal coalescing to ... > (perform_abnormal_coalescing): ... this function. > (coalesce_ssa_name): Perform abnormal coalescing without computing > live/conflict. I'd personally like to keep the checking when ENABLE_CHECKING. I haven't followed this discussion real closely, but I wonder if some kind of blocking approach would work without blowing up the memory consumption. There's no inherent reason why we have to coalesce everything at the same time. We can use a blocking factor and do coalescing on some N number of SSA_NAMEs at a time. I suspect we can select an N that ultimately degenerates into the current "do everything together" for the common case and only has to iterate over blocks of SSA_NAMEs in extreme cases. Jeff