From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 39609 invoked by alias); 6 Dec 2017 20:03:41 -0000 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 Received: (qmail 39598 invoked by uid 89); 6 Dec 2017 20:03:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=treessadcec, UD:tree-ssa-dce.c, tree-ssa-dce.c X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 06 Dec 2017 20:03:39 +0000 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BCDD181DF3; Wed, 6 Dec 2017 20:03:38 +0000 (UTC) Received: from localhost.localdomain (ovpn-112-2.rdu2.redhat.com [10.10.112.2]) by smtp.corp.redhat.com (Postfix) with ESMTP id 022576E71C; Wed, 6 Dec 2017 20:03:37 +0000 (UTC) Subject: Re: [029/nnn] poly_int: get_ref_base_and_extent To: gcc-patches@gcc.gnu.org, richard.sandiford@linaro.org References: <871sltvm7r.fsf@linaro.org> <87efptpz54.fsf@linaro.org> From: Jeff Law Message-ID: <02b84017-09a8-b722-44ce-1ff22fed413a@redhat.com> Date: Wed, 06 Dec 2017 20:03:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <87efptpz54.fsf@linaro.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2017-12/txt/msg00342.txt.bz2 On 10/23/2017 11:11 AM, Richard Sandiford wrote: > This patch changes the types of the bit offsets and sizes returned > by get_ref_base_and_extent to poly_int64. > > There are some callers that can't sensibly operate on polynomial > offsets or handle cases where the offset and size aren't known > exactly. This includes the IPA devirtualisation code (since > there's no defined way of having vtables at variable offsets) > and some parts of the DWARF code. The patch therefore adds > a helper function get_ref_base_and_extent_hwi that either returns > exact HOST_WIDE_INT bit positions and sizes or returns a null > base to indicate failure. > > > 2017-10-23 Richard Sandiford > Alan Hayward > David Sherwood > > gcc/ > * tree-dfa.h (get_ref_base_and_extent): Return the base, size and > max_size as poly_int64_pods rather than HOST_WIDE_INTs. > (get_ref_base_and_extent_hwi): Declare. > * tree-dfa.c (get_ref_base_and_extent): Return the base, size and > max_size as poly_int64_pods rather than HOST_WIDE_INTs. > (get_ref_base_and_extent_hwi): New function. > * cfgexpand.c (expand_debug_expr): Update call to > get_ref_base_and_extent. > * dwarf2out.c (add_var_loc_to_decl): Likewise. > * gimple-fold.c (get_base_constructor): Return the offset as a > poly_int64_pod rather than a HOST_WIDE_INT. > (fold_const_aggregate_ref_1): Track polynomial sizes and offsets. > * ipa-polymorphic-call.c > (ipa_polymorphic_call_context::set_by_invariant) > (extr_type_from_vtbl_ptr_store): Track polynomial offsets. > (ipa_polymorphic_call_context::ipa_polymorphic_call_context) > (check_stmt_for_type_change): Use get_ref_base_and_extent_hwi > rather than get_ref_base_and_extent. > (ipa_polymorphic_call_context::get_dynamic_type): Likewise. > * ipa-prop.c (ipa_load_from_parm_agg, compute_complex_assign_jump_func) > (get_ancestor_addr_info, determine_locally_known_aggregate_parts): > Likewise. > (ipa_get_adjustment_candidate): Update call to get_ref_base_and_extent. > * tree-sra.c (create_access, get_access_for_expr): Likewise. > * tree-ssa-alias.c (ao_ref_base, aliasing_component_refs_p) > (stmt_kills_ref_p): Likewise. > * tree-ssa-dce.c (mark_aliased_reaching_defs_necessary_1): Likewise. > * tree-ssa-scopedtables.c (avail_expr_hash, equal_mem_array_ref_p): > Likewise. > * tree-ssa-sccvn.c (vn_reference_lookup_3): Likewise. > Use get_ref_base_and_extent_hwi rather than get_ref_base_and_extent > when calling native_encode_expr. > * tree-ssa-structalias.c (get_constraint_for_component_ref): Update > call to get_ref_base_and_extent. > (do_structure_copy): Use get_ref_base_and_extent_hwi rather than > get_ref_base_and_extent. > * var-tracking.c (track_expr_p): Likewise. > I initially missed some of the additional checks performed by get_ref_base_and_extend_hwi and thought we had a problem with the transition to use that routine in various places. But eventually I saw the light. OK. jeff