From patchwork Thu Jan 18 16:28:12 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Hubicka X-Patchwork-Id: 863012 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-471598-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="Yx0oy7lK"; 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 3zMqBx67xCz9s83 for ; Fri, 19 Jan 2018 03:28:24 +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=eOzI82n4Vul3klC6gB0vjnth2m9qHrqsU4nYt555FoS72+eagfo+K l6AbojSwOzJ46Y3IdsV8wtYJ6ra7g4vK65+j6Y0RDQRnNalJUkmr511ekvwHn+ZB 3fxem1FNeRmeFc/FkHCnJK5Se/gArD1LWBLj1SUOlVttHS6riSDMSQ= 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=WE9QtX9EheXt3o7amUJygaJOLwc=; b=Yx0oy7lKNUol/lKnwrA/ ebdWgQUihoWTJmL9fpmxP9tQibNWdD/HTFAjksmkwG/SZe+YWOWQmO8ely3KQURM 4X67GIO5/7iekmNP7q4j0643BFJNvp4SFG0BJPfm9eyUD7cSdIbnrif+bCxgcYsY eNuGQLsdPq3vQKlsGb2MpBc= Received: (qmail 110058 invoked by alias); 18 Jan 2018 16:28:17 -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 110040 invoked by uid 89); 18 Jan 2018 16:28:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-9.7 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, KAM_LAZY_DOMAIN_SECURITY, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= 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; Thu, 18 Jan 2018 16:28:14 +0000 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id 905F9547E20; Thu, 18 Jan 2018 17:28:12 +0100 (CET) Date: Thu, 18 Jan 2018 17:28:12 +0100 From: Jan Hubicka To: gcc-patches@gcc.gnu.org Subject: Fix call of edge insertions hooks when cloning Message-ID: <20180118162812.GA95926@kam.mff.cuni.cz> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) Hi, this patch was attached to the PR for a while. I have regtested it and comitted. Honza Index: ChangeLog =================================================================== --- ChangeLog (revision 256850) +++ ChangeLog (working copy) @@ -1,5 +1,12 @@ 2018-01-18 Jan Hubicka + PR ipa/82256 + patch by PaX Team + * cgraphclones.c (cgraph_node::create_version_clone_with_body): + Fix call of call_cgraph_insertion_hooks. + +2018-01-18 Jan Hubicka + PR ipa/83619 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge frequencies. Index: cgraphclones.c =================================================================== --- cgraphclones.c (revision 256849) +++ cgraphclones.c (working copy) @@ -1007,7 +1007,7 @@ cgraph_node::create_version_clone_with_b /* Update the call_expr on the edges to call the new version node. */ update_call_expr (new_version_node); - symtab->call_cgraph_insertion_hooks (this); + symtab->call_cgraph_insertion_hooks (new_version_node); return new_version_node; }