From patchwork Wed Nov 13 19:46:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Hubicka X-Patchwork-Id: 1194447 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-513292-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ucw.cz Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="nQkt6cm7"; dkim-atps=neutral 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 47Cw8v5VQjz9sP6 for ; Thu, 14 Nov 2019 06:46:21 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=KgL3mfenhylewL2Hks2krTdizigH7Qv+oSzhMJyIfTilvr8Q9ViXf pW2qbaMS7rp77cEyuU5hy3AyGhccEIWCP1oRYdpFLS3tcHbFpiZcSxm5mlzojCj+ 28qT5bP+gS4c2a9uHp4iA1j2P73TvVcIjTk/E+NzUR/45Yfe10VxR0= 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:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=bkNeb9GXdL/7yrfBx4KypuZIeYg=; b=nQkt6cm7bk1bL7LVKYgp pIcfUDtBvax1j94VIt7r2FS4KbMfl/QDESeFOkrQArLehxI023ergFtZWCR+IW6j Y3yDASKAhtkgcr/YdsxXT1Z/j72EDcfGAS6wUzuI8blqX1XZroiEt7AhqDnxdMnl JJE/ffTRYZHj/wVdK4Tc5hY= Received: (qmail 94951 invoked by alias); 13 Nov 2019 19:46:13 -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 94304 invoked by uid 89); 13 Nov 2019 19:46:11 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-10.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.1 spammy=sk:verify_ X-HELO: nikam.ms.mff.cuni.cz Received: from nikam.ms.mff.cuni.cz (HELO nikam.ms.mff.cuni.cz) (195.113.20.16) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 13 Nov 2019 19:46:06 +0000 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id E8FDA281EE2; Wed, 13 Nov 2019 20:46:03 +0100 (CET) Date: Wed, 13 Nov 2019 20:46:03 +0100 From: Jan Hubicka To: gcc-patches@gcc.gnu.org Subject: Fix verify_propagated_use ICE during profiledbootstrap Message-ID: <20191113194603.ze2wxb2vcx7gej3k@kam.mff.cuni.cz> MIME-Version: 1.0 Content-Disposition: inline User-Agent: NeoMutt/20170113 (1.7.2) Hi, this patch fixes problem with ipa-cp ICEing while building gnatbind during profiledbootstrap. The problem is that I was overzelaous about ignoring callers with optimization disabled. Nothing useful can be propagated across them but we still need to process calle after the caller so we further propagate the info that we know nothing. Bootstrapped/regtested x86_64-linux, committed. * ipa-cp.c (ignore_edge_p): Do not check caller flags. (propagate_constants_topo): Fix typo. Index: ipa-cp.c =================================================================== --- ipa-cp.c (revision 278155) +++ ipa-cp.c (working copy) @@ -816,9 +816,7 @@ ignore_edge_p (cgraph_edge *e) = e->callee->function_or_virtual_thunk_symbol (&avail, e->caller); return (avail <= AVAIL_INTERPOSABLE - || !opt_for_fn (e->caller->decl, optimize) || !opt_for_fn (ultimate_target->decl, optimize) - || !opt_for_fn (e->caller->decl, flag_ipa_cp) || !opt_for_fn (ultimate_target->decl, flag_ipa_cp)); } @@ -3246,7 +3244,7 @@ propagate_constants_topo (class ipa_topo if (opt_for_fn (v->decl, flag_ipa_cp) && opt_for_fn (v->decl, optimize)) push_node_to_stack (topo, v); - /* When V is not optimized, we can not push it to stac, but + /* When V is not optimized, we can not push it to stack, but still we need to set all its callees lattices to bottom. */ else {