From patchwork Thu Nov 28 14:13:17 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew MacLeod X-Patchwork-Id: 294904 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)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id EE6B12C0098 for ; Fri, 29 Nov 2013 01:13:37 +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 :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; q=dns; s=default; b=L/kCRe3xyipcn8OBn blS8EGavviN1x3sgKq8/Tbviv2Xyabpx8jH+VGZ0W0SQ8m4GFlbhy837iZ6O61RM gFiRO0CyQfctfOz7GTH9xmQ0rcJCpQaM6UvG4LB+6JdtFCh3aCzTtfRCiUMfDeCG 9cykj+DOD1KKQvi+zaDucNIgpw= 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 :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; s=default; bh=iJqsbgPDb6qARtFsVCUwa1B FEqc=; b=RspRLepX2kHoquF4Bq5cXbJsrzbcRVoop+cjLaOMZw9188iA53medbU aWWD06gRwUiyiDJtxS4WkyGXMLK6gJXsNjzRPkyMzveBoU9nQb+0Ncky4vdiSYwW Mb5xoantaATaC39KGWl71dOmgIW/93gQnKDYaRDIxTLfZwNp1QRk= Received: (qmail 25588 invoked by alias); 28 Nov 2013 14:13:28 -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 25576 invoked by uid 89); 28 Nov 2013 14:13:27 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.3 required=5.0 tests=AWL, BAYES_50, RDNS_NONE, SPF_HELO_PASS, SPF_PASS autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from Unknown (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 28 Nov 2013 14:13:26 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id rASEDJoM030220 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 28 Nov 2013 09:13:19 -0500 Received: from [10.10.57.130] (vpn-57-130.rdu2.redhat.com [10.10.57.130]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id rASEDH0K017969; Thu, 28 Nov 2013 09:13:18 -0500 Message-ID: <52974F7D.7090105@redhat.com> Date: Thu, 28 Nov 2013 09:13:17 -0500 From: Andrew MacLeod User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Jeff Law , gcc-patches CC: Jan Hubicka , Richard Biener Subject: [patch] comitted : Re: [resend] - Probable buglet in ipa-prop.c References: <5296648B.4020805@redhat.com> <52966F45.7020107@redhat.com> <52967289.5070300@redhat.com> <52967777.6000104@redhat.com> In-Reply-To: <52967777.6000104@redhat.com> X-IsSubscribed: yes On 11/27/2013 05:51 PM, Jeff Law wrote: > On 11/27/13 15:30, Andrew MacLeod wrote: >> On 11/27/2013 05:16 PM, Jeff Law wrote: >>> On 11/27/13 14:30, Andrew MacLeod wrote: >>>> mailer added html again... >>>> ---------------------------------------- >>>> >>>> When trying some of my updated prototype changes on trunk, the code >>>> tripped over this segment in ipa-prop.c : >>>> >>>> lhs = gimple_assign_lhs (stmt); >>>> rhs = gimple_assign_rhs1 (stmt); >>>> if (!is_gimple_reg_type (rhs) >>>> || TREE_CODE (lhs) == BIT_FIELD_REF >>>> || contains_bitfld_component_ref_p (lhs)) >>>> break; >>>> >>>> I had converted "gimple_reg_type(tree)" to instead be "gimple_reg_type >>>> (gimple_type)", and during bootstrap it conked out because it >>>> received >>>> an SSA_NAME instead of a type. >>> Which probably caused everything after that conditional to be dead >>> code. >>> >>>> I think it should probably be passing TREE_TYPE (rhs) liek so ? >>> Yup. Agreed. Feel free to submit the fix. It'll be interested to >>> see how many of these we find as this work progresses. >>> >>> It'll also be interesting to see if there's any fallout from the >>> previously dead code now getting a chance to do something useful. >>> >> Just tripped over another one in tree-ssa-propagate.c: >> >> I'll bootstrap the 2 of them together and run regressions overnight, and >> then check them in tomorrow, assuming thats OK. > Works for me. > > jeff > Bootstrapped on x86_64-unknown-linux-gnu , no regressions. Attached patch checked in as revision 205485 Andrew * tree-ssa-propagate.c (valid_gimple_call_p): Pass TREE_TYPE to is_gimple_reg_type. * ipa-prop.c (determine_known_aggregate_parts): Likewise. Index: tree-ssa-propagate.c =================================================================== *** tree-ssa-propagate.c (revision 205457) --- tree-ssa-propagate.c (working copy) *************** valid_gimple_call_p (tree expr) *** 667,673 **** for (i = 0; i < nargs; i++) { tree arg = CALL_EXPR_ARG (expr, i); ! if (is_gimple_reg_type (arg)) { if (!is_gimple_val (arg)) return false; --- 667,673 ---- for (i = 0; i < nargs; i++) { tree arg = CALL_EXPR_ARG (expr, i); ! if (is_gimple_reg_type (TREE_TYPE (arg))) { if (!is_gimple_val (arg)) return false; Index: ipa-prop.c =================================================================== *** ipa-prop.c (revision 205457) --- ipa-prop.c (working copy) *************** determine_known_aggregate_parts (gimple *** 1424,1430 **** lhs = gimple_assign_lhs (stmt); rhs = gimple_assign_rhs1 (stmt); ! if (!is_gimple_reg_type (rhs) || TREE_CODE (lhs) == BIT_FIELD_REF || contains_bitfld_component_ref_p (lhs)) break; --- 1424,1430 ---- lhs = gimple_assign_lhs (stmt); rhs = gimple_assign_rhs1 (stmt); ! if (!is_gimple_reg_type (TREE_TYPE (rhs)) || TREE_CODE (lhs) == BIT_FIELD_REF || contains_bitfld_component_ref_p (lhs)) break;