From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 82396 invoked by alias); 14 Oct 2015 01:05:20 -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 82384 invoked by uid 89); 14 Oct 2015 01:05:19 -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,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; Wed, 14 Oct 2015 01:05:18 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 3EDB0461C8; Wed, 14 Oct 2015 01:05:17 +0000 (UTC) Received: from bigtime.twiddle.net (ovpn-113-208.phx2.redhat.com [10.3.113.208]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t9E15EOj005068; Tue, 13 Oct 2015 21:05:15 -0400 Subject: Re: using scratchpads to enhance RTL-level if-conversion: revised patch To: Bernd Schmidt , Abe , "gcc-patches@gcc.gnu.org" , Sebastian Pop , Kyrill Tkachov References: <5615AADE.4030306@yahoo.com> <56166E68.2040004@redhat.com> From: Richard Henderson Message-ID: <561DAA48.60604@redhat.com> Date: Wed, 14 Oct 2015 01:05:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 MIME-Version: 1.0 In-Reply-To: <56166E68.2040004@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-10/txt/msg01305.txt.bz2 On 10/09/2015 12:23 AM, Bernd Schmidt wrote: > On 10/08/2015 01:29 AM, Abe wrote: >> Attached please find my revised patch to the RTL if converter. This >> patch enables the >> if-conversion of half-hammocks with a store in them that the internal >> GCC machinery >> otherwise considers too hazardous to if-convert. This is made safe by >> using the >> "scratchpad" technique, i.e. throwing away the store into a safe >> location where nothing >> of any importance is currently stored. The scratchpads are allocated in >> the stack frame. > > So, one conceptual issue first. Obviously this increases the size of the stack > frame, which makes the transformation more expensive. The patch does not appear > to attempt to estimate costs. However, why do we need to allocate anything in > the first place? If you want to store something that will be thrown away, just > pick an address below the stack pointer. If you're using one of the switches that checks for stack overflow at the start of the function, you certainly don't want to do any such stores. r~