From patchwork Thu Nov 8 08:24:38 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 994684 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-489318-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="msR//0CZ"; 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 42rGYf2NvTz9sBZ for ; Thu, 8 Nov 2018 19:25:08 +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:from :subject:to:cc:message-id:date:mime-version:content-type; q=dns; s=default; b=ZOvLMK3W/LxFVeCYIs498sPuNT7MUsX9bwEdFE7tDNj7nHuAIi kxt/urqNUeKaW0qXCfCgMmtj/jS6Zfu56PUOWKf2TsatvEAcacKa9GkvvdLbT912 WDCrQnvTCgmDnhNXbhCIL3sqGG7pFsdhFDcvkm8X6NTWPjuOfXye4NCmE= 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 :subject:to:cc:message-id:date:mime-version:content-type; s= default; bh=Lowh0IFDE/N4w4vZ8U6vv7+xl5E=; b=msR//0CZZQuJuGzSgr+/ 55Bb3q/5+UZMCYMp49YQI5CmecnKKQHJeCCtmvwzPviwqlIGvf/OGObVBhgETNBl oh2iLOETrClex64OFmEf08nxjQWB5Urg8fR2ZHLVskUxLxKok08KiDc33DPJqeuv oqNX6Bnm6xxk/tEr/8HS7mc= Received: (qmail 35166 invoked by alias); 8 Nov 2018 08:25:00 -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 34998 invoked by uid 89); 8 Nov 2018 08:24:42 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.suse.de Received: from mx2.suse.de (HELO mx1.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 08 Nov 2018 08:24:41 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 1D3AFADF4; Thu, 8 Nov 2018 08:24:39 +0000 (UTC) From: =?utf-8?q?Martin_Li=C5=A1ka?= Subject: [PATCH] Remove unreachable nodes before IPA profile pass (PR ipa/87706). To: gcc-patches@gcc.gnu.org Cc: Jan Hubicka Message-ID: <8c883adb-9ec5-c9d5-f1cb-cc48a6ccd2ea@suse.cz> Date: Thu, 8 Nov 2018 09:24:38 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.2.1 MIME-Version: 1.0 X-IsSubscribed: yes Hi. In order to fix the warnings mentioned in the PR, we need to run remove_unreachable_nodes after early tree passes. That's however possible only within a IPA pass. Thus I'm calling that before the profile PASS. Patch survives regression tests on ppc64le-linux-gnu and majority of warnings are gone in profiledbootstrap. Ready for trunk? Thanks, Martin gcc/ChangeLog: 2018-11-08 Martin Liska * tree-profile.c: Run TODO_remove_functions before "profile" pass in order to remove dead functions that will trigger -Wmissing-profile. --- gcc/tree-profile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcc/tree-profile.c b/gcc/tree-profile.c index d8f2a3b1ba4..c14ebc556a6 100644 --- a/gcc/tree-profile.c +++ b/gcc/tree-profile.c @@ -776,7 +776,7 @@ const pass_data pass_data_ipa_tree_profile = 0, /* properties_required */ 0, /* properties_provided */ 0, /* properties_destroyed */ - 0, /* todo_flags_start */ + TODO_remove_functions, /* todo_flags_start */ TODO_dump_symtab, /* todo_flags_finish */ };