From patchwork Sun Nov 4 22:39:46 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Jambor X-Patchwork-Id: 197112 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 C5B172C00E1 for ; Mon, 5 Nov 2012 09:39:57 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1352673599; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Date: From:To:Cc:Subject:Message-ID:Mail-Followup-To:MIME-Version: Content-Type:Content-Disposition:User-Agent:Mailing-List: Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:Sender:Delivered-To; bh=i23MEhFWmbot+hLQngi+aUBtFvA=; b=I7DREEQ+DUxEV7Uw2HL9rOirL76hl5zgC//TEWYL9xDYfFswaQPuE0l1RXtpdC CM/ytZuIKaMN6yZhEyGQQMxCm57uh72WUh6pV1DyqICQTt/1ylcuseIUzGpp9xct ULIReRPBNmkbNoRKYB3j1UIFcVKm0Y36i/GvQmjXGjKDY= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Date:From:To:Cc:Subject:Message-ID:Mail-Followup-To:MIME-Version:Content-Type:Content-Disposition:User-Agent:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=bL79kGJYt2PYZnLc7F9vOr28+rGWsa3QpIZTVN28y+1mKeRZHPuYaBo6mI3ZRN tUEHjN82v+fleQ0xo5Wnob4d/lQWmtb6G0qGAkxz79nKz8ZUyl7A+p78LcHVzAnR WJEBeIalBtqterYNtyjy1kRPQC6FLJ0U2AEBJnUM0jgek=; Received: (qmail 12844 invoked by alias); 4 Nov 2012 22:39:54 -0000 Received: (qmail 12834 invoked by uid 22791); 4 Nov 2012 22:39:53 -0000 X-SWARE-Spam-Status: No, hits=-5.4 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, RCVD_IN_DNSWL_HI 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; Sun, 04 Nov 2012 22:39:48 +0000 Received: from relay1.suse.de (unknown [195.135.220.254]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx2.suse.de (Postfix) with ESMTP id 5462399430; Sun, 4 Nov 2012 23:39:47 +0100 (CET) Date: Sun, 4 Nov 2012 23:39:46 +0100 From: Martin Jambor To: GCC Patches Cc: Jan Hubicka Subject: [PATCH] Disable aggregate jump functions for bit-field stores Message-ID: <20121104223946.GC5617@virgil.arch.suse.de> Mail-Followup-To: GCC Patches , Jan Hubicka MIME-Version: 1.0 Content-Disposition: inline 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-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Hi, the patch below disables generation of aggregate jump functions from bit-field stores because currently we depend on type size of the value to determine the size of the stored value and that does not work with bit-fields, making it impossible for IPA-CP to organize them in their lattices. If we ever decide aggregate jump functions for bit-fields are worth the hassle, we might remove this limitation by storing and streaming the size of the memory reference alongside the offset in the jump functions (and IPA-CP lattices). Bootstrapped and tested on x86_64-linux, needed for the aggregate IPA-CP. OK for trunk? Thanks, Martin 2012-11-02 Martin Jambor * ipa-prop.c (determine_known_aggregate_parts): Do not create aggregate jump functions for bit-fields. Index: src/gcc/ipa-prop.c =================================================================== --- src.orig/gcc/ipa-prop.c +++ src/gcc/ipa-prop.c @@ -1295,7 +1295,10 @@ determine_known_aggregate_parts (gimple lhs = gimple_assign_lhs (stmt); rhs = gimple_assign_rhs1 (stmt); - if (!is_gimple_reg_type (rhs)) + if (!is_gimple_reg_type (rhs) + || TREE_CODE (lhs) == BIT_FIELD_REF + || (TREE_CODE (lhs) == COMPONENT_REF + && DECL_BIT_FIELD (TREE_OPERAND (lhs, 1)))) break; lhs_base = get_ref_base_and_extent (lhs, &lhs_offset, &lhs_size,