From patchwork Mon Nov 5 21:04:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Hubicka X-Patchwork-Id: 993390 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-489109-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="ED1QsG1A"; 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 42plYt2d2pz9sBk for ; Tue, 6 Nov 2018 08:05:04 +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=OXFmeI4NJg22+nVFDxmvgjuEC06YFy9kBf5hQ7cM/jAsEWQbAx6gs B1UkydG9tzwGJQlCncP/yfZdQOVDErUFcYwX0Jsb0nM1D6olKIBanknWlVf75+H2 SUB/36l0I5JNVvNSaEWOf1yI3pmipVr1TNh1zeafnkzJ16Jdq5u9xg= 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=unZhly8MmoLwb/SExmhJ35geUwo=; b=ED1QsG1AAhQMS7UWCDTL 4NfePfM2EUkkpblgs6BcvH7jXPk0uCgVIWCR21C1CrLi7Wvxn9KmelfhV15Lvlzz p3r7Ns9dcTUGrnKUbX6jduIK8Ps/v5cb59em5PPEnzn69zHS3i2SWQ9I1y9bqRbe dA/AJtiBGTMAp+3BOzq566Y= Received: (qmail 65071 invoked by alias); 5 Nov 2018 21:04:57 -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 63670 invoked by uid 89); 5 Nov 2018 21:04:54 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-10.9 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_2, GIT_PATCH_3, KAM_LAZY_DOMAIN_SECURITY 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; Mon, 05 Nov 2018 21:04:52 +0000 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id B355F2804EC; Mon, 5 Nov 2018 22:04:49 +0100 (CET) Date: Mon, 5 Nov 2018 22:04:49 +0100 From: Jan Hubicka To: gcc-patches@gcc.gnu.org, rguenther@suse.de Subject: Reset more langhooks at free lang data Message-ID: <20181105210449.mcyelb6wstupdqj2@kam.mff.cuni.cz> MIME-Version: 1.0 Content-Disposition: inline User-Agent: NeoMutt/20170113 (1.7.2) Hi, this patch reset some of frontend langhooks that I think should be completely handled by middle-end now. I will also make patch to rewrite set_assembler_name in some way that is safe, the comment bellow the hunk added is bit oversimplified because we do add external symbols (such as ctors and dtors or profile stuff). The patch fixed the ICE in var_mod_type_p with obj-c++. The other hooks was changed more as a pre-cauntion. We want to detach FE as much as possible from middle-end. lto-Bootstrapped/regtested x86_64-linux, OK? Honza * tree.c (free_lang_data): Reset overwite_assembler_name, print_xnode, print_decl, print_type and print_identifier of langhooks. Index: tree.c =================================================================== --- tree.c (revision 265807) +++ tree.c (working copy) @@ -6010,6 +6016,13 @@ free_lang_data (void) lang_hooks.dwarf_name = lhd_dwarf_name; lang_hooks.decl_printable_name = gimple_decl_printable_name; lang_hooks.gimplify_expr = lhd_gimplify_expr; + lang_hooks.overwrite_decl_assembler_name = lhd_overwrite_decl_assembler_name; + lang_hooks.print_xnode = lhd_print_tree_nothing; + lang_hooks.print_decl = lhd_print_tree_nothing; + lang_hooks.print_type = lhd_print_tree_nothing; + lang_hooks.print_identifier = lhd_print_tree_nothing; + + lang_hooks.tree_inlining.var_mod_type_p = hook_bool_tree_tree_false; /* We do not want the default decl_assembler_name implementation, rather if we have fixed everything we want a wrapper around it