From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26495 invoked by alias); 22 Jun 2011 16:24:35 -0000 Received: (qmail 26478 invoked by uid 22791); 22 Jun 2011 16:24:33 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_50,TW_CP X-Spam-Check-By: sourceware.org Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 22 Jun 2011 16:24:19 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.221.2]) by mx2.suse.de (Postfix) with ESMTP id F0DF289471; Wed, 22 Jun 2011 18:24:17 +0200 (CEST) Date: Wed, 22 Jun 2011 16:37:00 -0000 From: Martin Jambor To: Richard Guenther Cc: gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org Subject: Re: [PATCH] middle-end only piece of middle-end array expressions Message-ID: <20110622162417.GB20055@virgil.arch.suse.de> Mail-Followup-To: Richard Guenther , gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes 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 X-SW-Source: 2011-06/txt/msg01683.txt.bz2 Hi, On Tue, Jun 21, 2011 at 05:12:40PM +0200, Richard Guenther wrote: > > This is the middle-end pieces, without the C/C++ frontend changes. > Enough to work on the Fortran parts. > > Doesn't even break bootstrap. > > Richard. > > 2008-04-11 Richard Guenther > > * builtin-attrs.def (ATTR_COVARIANTRETURN): Add. > (ATTR_NOTHROW_TYPEGENERIC): Likewise. > (ATTR_NOTHROW_TYPEGENERIC_COVARIANTRETURN): Likewise. > * builtins.def (BUILT_IN_ARRAY_SELECT): New builtin function. > (BUILT_IN_ARRAY_STORE): Likewise. > (BUILT_IN_ARRAY_IDX): Likewise. > (BUILT_IN_ARRAY_RIDX): Likewise. > (BUILT_IN_ARRAY_DELTA): Likewise. > * gimplify.c (internal_get_tmp_var): Mark array temporaries > as gimple register. > (gimple_add_tmp_var): Do not require constant size for array > temporaries. > (maybe_with_size_expr): Do not wrap VLA_VIEW_EXPR or VLA_RIDX_EXPR > inside WITH_SIZE_EXPR. > (get_array_arg_type): New helper function. > (vla_to_vla_view_expr): Likewise. > (lower_builtin_array_expr): Helper for gimplifying array builtins > to VLA tree expressions. > (gimplify_call_expr): Call it. > (gimplify_modify_expr): Do not wrap copies of array temporaries > inside WITH_SIZE_EXPR. Do not lower copies of array temporaries > to memcpy calls. > (gimplify_expr): Handle VLA_VIEW_EXPR, VLA_IDX_EXPR, VLA_RIDX_EXPR > and VLA_DELTA_EXPR. > * tree-gimple.c (is_gimple_formal_tmp_rhs): Allow VLA_IDX_EXPR, > VLA_RIDX_EXPR and VLA_DELTA_EXPR. > (is_gimple_lvalue): Allow VLA_VIEW_EXPR. > (is_gimple_reg_type): Allow arrays. > (is_gimple_reg): Likewise. > * cfgexpand.c (estimated_stack_frame_size): Gimple registers do > not consume stack space. > * tree-cfg.c (verify_gimple_expr): Handle WITH_SIZE_EXPR, > VLA_VIEW_EXPR, VLA_IDX_EXPR, VLA_RIDX_EXPR and VLA_DELTA_EXPR. > * tree-inline.c (estimate_num_insns_1): Handle VLA_IDX_EXPR > and VLA_RIDX_EXPR. Treat VLA_VIEW_EXPR and VLA_DELTA_EXPR > as expensive as OMP stuff. > * tree-pretty-print.c (dump_generic_node): Handle VLA_VIEW_EXPR, > VLA_IDX_EXPR, VLA_RIDX_EXPR and VLA_DELTA_EXPR. > * tree.def (VLA_VIEW_EXPR): New tree code. > (VLA_IDX_EXPR): Likewise. > (VLA_RIDX_EXPR): Likewise. > (VLA_DELTA_EXPR): Likewise. > * tree-ssa-operands.c (get_expr_operands): Handle them all. > * tree-ssa-sccvn.c (visit_use): Handle only calls like calls. > * tree-ssa-sink.c (is_hidden_global_store): VLA_VIEW_EXPR is one. > * ipa-pure-const.c (check_tree): Look int VLA_VIEW_EXPRs VLA > argument. > * tree-dfa.c (refs_may_alias_p): Allow VLA_VIEW_EXPR. > * tree-sra.c (maybe_lookup_element_for_expr): Make sure to > not scalarize arrays used in VLA_VIEW_EXPR. > (sra_walk_expr): Likewise. It probably does not matter but the tree-sra hunks were not included in the patch. Martin