From patchwork Sat May 21 16:36:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andi Kleen X-Patchwork-Id: 624863 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 3rBr7w0s7qz9t0r for ; Sun, 22 May 2016 02:37:47 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=cKUhgZzu; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:in-reply-to:references; q=dns; s= default; b=e5MicdfZN1qxzhOns87KVlJ69FNOn2I/1jFXH0Gr8MQSsWvuISQP5 YuYohKoqRuCTyRvo36ZQGzLKiqNm5hfB1PIEES2uoH/s0CajH1/AzgxqHiNKujML 51FdSyaWef8V8jpiU2eTBRTzWReheusL4IcaEiwNVQjXLa/zDtsD+A= 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:from :to:cc:subject:date:message-id:in-reply-to:references; s= default; bh=X9f4ZNDyvyI23lyZA8hVWCAQBdE=; b=cKUhgZzufVB5hm+gNlJE sQA7mr5xqDkGstENtr58Atn6Ws+UIz+ZJV2j0V1krT7F4ocRJ0eUJlYuc+KL16xx 6xdW9ziuouTKWuhC9VBi8N773KdP3fQTA9SRU0oeCnWZdSzM0N4mX0VgrlH6/K50 CWOVwKp9f5dzFLIMr9mq10U= Received: (qmail 78522 invoked by alias); 21 May 2016 16:37:11 -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 77528 invoked by uid 89); 21 May 2016 16:37:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: one.firstfloor.org Received: from one.firstfloor.org (HELO one.firstfloor.org) (193.170.194.197) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Sat, 21 May 2016 16:37:00 +0000 Received: from firstfloor.org (63-225-80-217.ptld.qwest.net [63.225.80.217]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by one.firstfloor.org (Postfix) with ESMTPSA id 41183872A7; Sat, 21 May 2016 18:36:54 +0200 (CEST) Received: by firstfloor.org (Postfix, from userid 1000) id CD0D8A0F87; Sat, 21 May 2016 09:36:32 -0700 (PDT) From: Andi Kleen To: gcc-patches@gcc.gnu.org Cc: Andi Kleen Subject: [PATCH 5/5] workaround for PR70427 Date: Sat, 21 May 2016 09:36:26 -0700 Message-Id: <1463848586-19259-6-git-send-email-andi@firstfloor.org> In-Reply-To: <1463848586-19259-5-git-send-email-andi@firstfloor.org> References: <1463848586-19259-1-git-send-email-andi@firstfloor.org> <1463848586-19259-2-git-send-email-andi@firstfloor.org> <1463848586-19259-3-git-send-email-andi@firstfloor.org> <1463848586-19259-4-git-send-email-andi@firstfloor.org> <1463848586-19259-5-git-send-email-andi@firstfloor.org> From: Andi Kleen This makes autofdo bootstrap not crash. This is probably not the right fix, but for now it works for me. Not for submission. --- gcc/ipa-profile.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/ipa-profile.c b/gcc/ipa-profile.c index da17bcd..c7d7792 100644 --- a/gcc/ipa-profile.c +++ b/gcc/ipa-profile.c @@ -201,6 +201,8 @@ ipa_profile_generate_summary (void) if (h->hvalue.counters[2]) { struct cgraph_edge * e = node->get_edge (stmt); + if (!e) + continue; if (e && !e->indirect_unknown_callee) continue; e->indirect_info->common_target_id