From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30009 invoked by alias); 21 Mar 2003 19:44:41 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 29680 invoked from network); 21 Mar 2003 19:44:29 -0000 Received: from unknown (HELO faui11.informatik.uni-erlangen.de) (131.188.31.2) by sources.redhat.com with SMTP; 21 Mar 2003 19:44:29 -0000 Received: (from weigand@localhost) by faui11.informatik.uni-erlangen.de (8.9.1/8.1.4-FAU) id UAA16040; Fri, 21 Mar 2003 20:44:26 +0100 (MET) From: Ulrich Weigand Message-Id: <200303211944.UAA16040@faui11.informatik.uni-erlangen.de> Subject: Re: RFA: Ada variable-sized objects, bit_size_type == TImode, and divti3 To: rth@redhat.com (Richard Henderson) Date: Fri, 21 Mar 2003 20:25:00 -0000 Cc: weigand@immd1.informatik.uni-erlangen.de (Ulrich Weigand), gcc@gcc.gnu.org, uweigand@de.ibm.com In-Reply-To: <20030321071015.GA7800@redhat.com> from "Richard Henderson" at Mar 20, 2003 11:10:15 PM MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-SW-Source: 2003-03/txt/msg01380.txt.bz2 Richard Henderson wrote: > On Fri, Mar 21, 2003 at 02:15:36AM +0100, Ulrich Weigand wrote: > > Well, but we don't need the size in bits when computing stack > > alignment. > > True. Perhaps you can find out why we're doing this? OK, what happens here is that Ada passes to expand_decl a tree describing this dynamically sized variable which has this as 'size' (i.e. size in bits) expression: arg 0 arg 0 arg 0 arg 0 arg 0 arg 0 readonly arg 0 > arg 1 >>> arg 1 > arg 1 > arg 1 > and this even more complex tree as 'unit size' (size in bytes): arg 0 arg 0 arg 0 arg 0 arg 0 arg 0 arg 0 >> arg 1 > arg 1 >> arg 1 > arg 1 > expand_decl then passes this tree to expand_expr in order to compute the size needed for the variable (which is then passed on to allocate_dynamic_stack_space). expand_expr now goes through this tree and creates a whole bunch of RTL expressing all that stuff, including conversions between DImode and TImode and the various divisions and multiplications. The resulting RTL is then so complex that it won't get optimized away by the RTL optimizers. It would appear that at some stage in the process this expression could be simplified to avoid use of TImode operations, but I'm not familiar enough with the front-end parts to decide where ... Bye, Ulrich -- Dr. Ulrich Weigand weigand@informatik.uni-erlangen.de