From patchwork Thu Jan 2 04:12:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Stump X-Patchwork-Id: 306050 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 2DE0C2C009A for ; Thu, 2 Jan 2014 15:12:48 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; q=dns; s=default; b=R4rMqA/hef0r25pyR RNuFX+4xJsXpUCIE/9N7xO5BznGBlxsPAn0ufakXcoxDEmLhsTXIh4pE5QHEJdGY V16rx+Uc4uzvL/TpgPhvnjXlTruxwpmVA8MOJZW4+wd9ecfuzRb1QTuhjK7ivUoO j1r/JJCvvoo/oSD09nVnRsg2Rw= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; s=default; bh=wFo88tgrc6FnhbHa7ta6T1B PEDE=; b=kj/Aw6Yk2LNnFaupCDwESZAaSPh917x7LUT0jj4OZKynmDUDsGV5/Lq t7U3EQITwXYQU2LOXkpR2+Y9tfBaMFyulqFbAXy+n9s1oNYwphKCxg2ePf9Bk/Cp cqFODrpbjH1S0SixM4KDz6DscZ5YF7HIhwadBjeotoVsNkjUkNUw= Received: (qmail 22502 invoked by alias); 2 Jan 2014 04:12:42 -0000 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 Received: (qmail 22490 invoked by uid 89); 2 Jan 2014 04:12:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 X-HELO: qmta05.emeryville.ca.mail.comcast.net Received: from qmta05.emeryville.ca.mail.comcast.net (HELO qmta05.emeryville.ca.mail.comcast.net) (76.96.30.48) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 02 Jan 2014 04:12:41 +0000 Received: from omta19.emeryville.ca.mail.comcast.net ([76.96.30.76]) by qmta05.emeryville.ca.mail.comcast.net with comcast id 8rZP1n0021eYJf8A5sCfCH; Thu, 02 Jan 2014 04:12:39 +0000 Received: from up.mrs.kithrup.com ([24.4.193.8]) by omta19.emeryville.ca.mail.comcast.net with comcast id 8sCe1n00X0BKwT401sCfRe; Thu, 02 Jan 2014 04:12:39 +0000 Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) Subject: Re: wide-int, ipa From: Mike Stump In-Reply-To: Date: Wed, 1 Jan 2014 20:12:38 -0800 Cc: Kenneth Zadeck , Mike Stump Message-Id: <5C2EC229-6322-4263-B4FE-6C06EEC946A9@comcast.net> References: To: "gcc-patches@gcc.gnu.org Patches" X-IsSubscribed: yes On Nov 23, 2013, at 11:22 AM, Mike Stump wrote: > Richi has asked the we break the wide-int patch so that the individual port and front end maintainers can review their parts without have to go through the entire patch. This patch covers the ipa code. > > Ok? Ping? I promise, this patch isn't frightening. Small, easy to read and understand, doesn't require an ipa expert. * ipa-devirt.c (get_polymorphic_call_info): Use wide-int interfaces. * ipa-prop.c (compute_complex_assign_jump_func): Use wide-int interfaces. (get_ancestor_addr_info): Likewise. (ipa_modify_call_arguments): Likewise. diff --git a/gcc/ipa-devirt.c b/gcc/ipa-devirt.c index 38cf378..41e5300 100644 --- a/gcc/ipa-devirt.c +++ b/gcc/ipa-devirt.c @@ -968,7 +968,7 @@ get_polymorphic_call_info (tree fndecl, { base_pointer = TREE_OPERAND (base, 0); context->offset - += offset2 + mem_ref_offset (base).low * BITS_PER_UNIT; + += offset2 + mem_ref_offset (base).ulow () * BITS_PER_UNIT; context->outer_type = NULL; } /* We found base object. In this case the outer_type diff --git a/gcc/ipa-prop.c b/gcc/ipa-prop.c index d122dd5..3953442 100644 --- a/gcc/ipa-prop.c +++ b/gcc/ipa-prop.c @@ -1063,7 +1063,7 @@ compute_complex_assign_jump_func (struct ipa_node_params *info, || max_size == -1 || max_size != size) return; - offset += mem_ref_offset (base).low * BITS_PER_UNIT; + offset += mem_ref_offset (base).to_short_addr () * BITS_PER_UNIT; ssa = TREE_OPERAND (base, 0); if (TREE_CODE (ssa) != SSA_NAME || !SSA_NAME_IS_DEFAULT_DEF (ssa) @@ -1122,7 +1122,7 @@ get_ancestor_addr_info (gimple assign, tree *obj_p, HOST_WIDE_INT *offset) || TREE_CODE (SSA_NAME_VAR (parm)) != PARM_DECL) return NULL_TREE; - *offset += mem_ref_offset (expr).low * BITS_PER_UNIT; + *offset += mem_ref_offset (expr).to_short_addr () * BITS_PER_UNIT; *obj_p = obj; return expr; } @@ -3661,9 +3661,8 @@ ipa_modify_call_arguments (struct cgraph_edge *cs, gimple stmt, if (TYPE_ALIGN (type) > align) align = TYPE_ALIGN (type); } - misalign += (tree_to_double_int (off) - .sext (TYPE_PRECISION (TREE_TYPE (off))).low - * BITS_PER_UNIT); + misalign += (offset_int::from (off, SIGNED) + * BITS_PER_UNIT).to_short_addr (); misalign = misalign & (align - 1); if (misalign != 0) align = (misalign & -misalign);