From patchwork Thu Jun 25 15:38:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iain Buclaw X-Patchwork-Id: 1317007 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=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gcc.gnu.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=pissxYf6; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49t41M685yz9sRW for ; Fri, 26 Jun 2020 01:38:46 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4751A3840C37; Thu, 25 Jun 2020 15:38:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4751A3840C37 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1593099523; bh=YgXpC3E3jL6jg/d+B1eyLKbNqCjLnzVcrMcJzo+ZVbI=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=pissxYf6B3KwvtmLTgXZwyX6cwbCGssKwfkQfpNfH1DZSMjjSUOjupCgTbai9CXHT hzNADHNzqawD8hRzBjIuHwlacUGGy2zfd2sHxNF0ahDSVwle9+wKrfx767ik625L/v 7+AaDZst2deylCoZgVljMJ5Q5JUcEPt1int/j73M= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mout-p-101.mailbox.org (mout-p-101.mailbox.org [80.241.56.151]) by sourceware.org (Postfix) with ESMTPS id 216E33858D34 for ; Thu, 25 Jun 2020 15:38:41 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 216E33858D34 Received: from smtp1.mailbox.org (smtp1.mailbox.org [80.241.60.240]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 49t41C5RB8zKmg5; Thu, 25 Jun 2020 17:38:39 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by spamfilter06.heinlein-hosting.de (spamfilter06.heinlein-hosting.de [80.241.56.125]) (amavisd-new, port 10030) with ESMTP id P1SbwBq6EUH7; Thu, 25 Jun 2020 17:38:36 +0200 (CEST) To: gcc-patches@gcc.gnu.org Subject: [committed] d: Do not implicitly set DECL_DECLARED_INLINE_P on member functions. Date: Thu, 25 Jun 2020 17:38:18 +0200 Message-Id: <20200625153828.2304469-1-ibuclaw@gdcproject.org> MIME-Version: 1.0 X-MBO-SPAM-Probability: 1 X-Rspamd-Score: 0.30 / 15.00 / 15.00 X-Rspamd-Queue-Id: B2CFC1784 X-Rspamd-UID: 12d21d X-Spam-Status: No, score=-17.1 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Iain Buclaw via Gcc-patches From: Iain Buclaw Reply-To: Iain Buclaw Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" Hi, This patch removes the implicit setting of DECL_DECLARATED_INLINE_P on member function. This has been questionable behaviour since it was added, and though it has no effect on wider discussions around what should be the correct semantics of pragma(inline) within D modules, doing this tree-level optimization has mostly zero benefit as cross-module inlining doesn't happen anyway. Bootstrapped and regression tested on x86_64-linux-gnu, and committed to mainline. Regards Iain. --- gcc/d/ChangeLog: * decl.cc (get_symbol_decl): Do not implicitly set DECL_DECLARED_INLINE_P on member functions. --- gcc/d/decl.cc | 7 ------- 1 file changed, 7 deletions(-) diff --git a/gcc/d/decl.cc b/gcc/d/decl.cc index 77144fe11c8..15eb9a43399 100644 --- a/gcc/d/decl.cc +++ b/gcc/d/decl.cc @@ -1250,13 +1250,6 @@ get_symbol_decl (Declaration *decl) } /* Miscellaneous function flags. */ - if (fd->isMember2 () || fd->isFuncLiteralDeclaration ()) - { - /* See grokmethod in cp/decl.c. Maybe we shouldn't be setting inline - flags without reason or proper handling. */ - DECL_DECLARED_INLINE_P (decl->csym) = 1; - DECL_NO_INLINE_WARNING_P (decl->csym) = 1; - } /* In [pragma/inline], functions decorated with `pragma(inline)' affects whether they are inlined or not. */