From patchwork Wed Jun 16 14:25:59 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 55888 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 2B3CF1007D3 for ; Thu, 17 Jun 2010 00:26:09 +1000 (EST) Received: (qmail 13361 invoked by alias); 16 Jun 2010 14:26:07 -0000 Received: (qmail 13307 invoked by uid 22791); 16 Jun 2010 14:26:06 -0000 X-SWARE-Spam-Status: No, hits=-3.4 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD 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, 16 Jun 2010 14:26:02 +0000 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.221.2]) by mx2.suse.de (Postfix) with ESMTP id 968BE89783 for ; Wed, 16 Jun 2010 16:25:59 +0200 (CEST) Date: Wed, 16 Jun 2010 16:25:59 +0200 (CEST) From: Richard Guenther To: gcc-patches@gcc.gnu.org Subject: [PATCH] Always make complex & vector variables registers Message-ID: User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 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 The need to conditionalize on optimization is gone after we now go into SSA at -O0. Bootstrapped and tested on x86_64-unknown-linux-gnu, will apply to trunk tomorrow if there aren't serious concerns. Richard. 2010-06-16 Richard Guenther * gimplify.c (gimplify_bind_expr): Always promote complex and vector variables to registers if possible. Index: gcc/gimplify.c =================================================================== --- gcc/gimplify.c (revision 160835) +++ gcc/gimplify.c (working copy) @@ -1153,14 +1153,9 @@ gimplify_bind_expr (tree *expr_p, gimple /* Preliminarily mark non-addressed complex variables as eligible for promotion to gimple registers. We'll transform their uses - as we find them. - We exclude complex types if not optimizing because they can be - subject to partial stores in GNU C by means of the __real__ and - __imag__ operators and we cannot promote them to total stores - (see gimplify_modify_expr_complex_part). */ - if (optimize - && (TREE_CODE (TREE_TYPE (t)) == COMPLEX_TYPE - || TREE_CODE (TREE_TYPE (t)) == VECTOR_TYPE) + as we find them. */ + if ((TREE_CODE (TREE_TYPE (t)) == COMPLEX_TYPE + || TREE_CODE (TREE_TYPE (t)) == VECTOR_TYPE) && !TREE_THIS_VOLATILE (t) && (TREE_CODE (t) == VAR_DECL && !DECL_HARD_REGISTER (t)) && !needs_to_live_in_memory (t))