From patchwork Sun Nov 4 22:39:46 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Disable aggregate jump functions for bit-field stores Date: Sun, 04 Nov 2012 12:39:46 -0000 From: Martin Jambor X-Patchwork-Id: 197112 Message-Id: <20121104223946.GC5617@virgil.arch.suse.de> To: GCC Patches Cc: Jan Hubicka 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,