Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp7504676ybn; Mon, 30 Sep 2019 15:09:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqzgioVQa5SF8xM7e0aKUtH8I9i67xYQa9JTAoTu2ouy/SCowRoYhB5YYRXxgyYLfQyutNVT X-Received: by 2002:a17:906:5ad8:: with SMTP id x24mr21300140ejs.107.1569881344885; Mon, 30 Sep 2019 15:09:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569881344; cv=none; d=google.com; s=arc-20160816; b=RlnjPl8DgOyJH+8b9TW+2SkuCw2VxozS1MOJ+gsloHzTHh8c9dpjxuISJ5FdESWkzx RRD/el51uMkN+B5O0whSNFzUClbm3+2zKGgOPpK3hCrYDtObS3XICCMo1f+qrbHnni8i P2ff5Rlw6hpmZbze5CUI0eb678XKQIWZ01ys3lD4/U6atO7QPG/oKHasN7W3gXQhofUQ HvlMy3ITI3gztru1B7QXySEdNx2oNuFFleQl49sNuKbYXFi0nruASe0EEZLMI2wEyaPC RWhjIpvMYeOfPpEuCHZry2ooIRBz8B5IP4sAarnJQtT0jeCQYcj6DXkI8z+/6XgJLycf whNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=XVYFsDz4vREp8ZSRf0zTMs244xJkgJaF/u18hl6MGk4=; b=eKuMRRn+HmH1AxxZM8uTjU9Pt5I1PYbrGUGvf1vSaNbjn4Pt5sSmQDHgBM4UuPI99c XZoGNcCbfPOxoffVZvmzIlG7HnuWYm9I6qlyw2FwptK0jPP+IFHqV6KgblUQukw0OpV0 yiS5g/8jOQXdYuCOO484kDbxtWtdSueyVsBy3/9pFhVMBKbcmxogUKfoyXWr122XhVE5 69ciy6fAinJsTOu4/5f/rm+vgmMk0rTqcaW1R4p7VqkGwN7hnDlSgypLp6zgPDY3uzaV ufEFxxlbUwvboreHSCbSmjM8L1vVAyzyw4jdumvpbpyzFSQqcyJ8upUaxBlmDNUXOJrP G3tQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="SosvQtC/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y2si7815115ejw.308.2019.09.30.15.08.40; Mon, 30 Sep 2019 15:09:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b="SosvQtC/"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731878AbfI3WIV (ORCPT + 99 others); Mon, 30 Sep 2019 18:08:21 -0400 Received: from mail-lj1-f195.google.com ([209.85.208.195]:40345 "EHLO mail-lj1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726784AbfI3WIV (ORCPT ); Mon, 30 Sep 2019 18:08:21 -0400 Received: by mail-lj1-f195.google.com with SMTP id 7so11138505ljw.7; Mon, 30 Sep 2019 15:08:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=XVYFsDz4vREp8ZSRf0zTMs244xJkgJaF/u18hl6MGk4=; b=SosvQtC/R1g7Bd+ChiKpXUzohopP6VF9c+Sh39MAYTApzuZC8aEMcZ7JLDdGKJ64XO 6w7vQncP03M6KqvYbtDbd/4EPgGzeaYZKCJ0uzyumQt4Kgl9Jrq6rwvNcQcfk3tswl9M 00iKOPKUYhqPTEHBJySaUo6i7M+RI1b/alftpJi2EHCg7ojN0S4BMu2nw1a3BHkeb5AN 8VA4Pfv9wXACOc7TCrCczTueAVXHfGO4P91mw4H/lEAeecd1E4w4/1kdvk4wWfqOO4YI GQKdg4gJaRSgXd4LAZ/Y6ytFH01TVfrK2iDqGjUYJEIcC3REbhbjPYk9EcsvjIq3Toq2 CNog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=XVYFsDz4vREp8ZSRf0zTMs244xJkgJaF/u18hl6MGk4=; b=EbQ2XhQ5CLkf6wAl/7nPxgVjHstGSyNQpOaE2OlJsjfsp2EQWDIJV76A1399uvvaiZ LDYBzfuhWL3ONNU/+PjM+PI7emZ1LWj1Tmo9qLO/BmIbJR8b5MWGAAe/aI+TfUP6KBiQ 3SAH1UB10AGSpunautwFOdF0M00W9YSHXqEa9jenQkSFpLvFZh03a4Ni6hX+27FD1hTj BzVeevkTw7T8ETp7v4/xodYcIuSK23O6nDRlpxBzkq/yb1/74OzLPFKnbHr9QHV9O/HI DckjwQtW6ynKIruZuNMnz1cj1UfKVdyXEJooUpfyqa/Us4jeBq36pStg8dnr6Y1HV1ES QX7A== X-Gm-Message-State: APjAAAWh78WzKTnXzuXTmVbykP2VN49F5/RdN1lwcyFa/rwUsWb8bTqU ibVbJgg5BYDCOtzAuBFsBFuaYjB3yuv96qKn5PM= X-Received: by 2002:a2e:4704:: with SMTP id u4mr13379612lja.203.1569881298946; Mon, 30 Sep 2019 15:08:18 -0700 (PDT) MIME-Version: 1.0 References: <20190830034304.24259-1-yamada.masahiro@socionext.com> <20190930112636.vx2qxo4hdysvxibl@willie-the-truck> <20190930121803.n34i63scet2ec7ll@willie-the-truck> In-Reply-To: From: Miguel Ojeda Date: Tue, 1 Oct 2019 00:08:07 +0200 Message-ID: Subject: Re: [PATCH] compiler: enable CONFIG_OPTIMIZE_INLINING forcibly To: Nick Desaulniers Cc: Will Deacon , Masahiro Yamada , Linus Torvalds , Nicolas Saenz Julienne , Andrew Morton , Ingo Molnar , Borislav Petkov , linux-arch , LKML , Catalin Marinas , Russell King , Stefan Wahren , Kees Cook Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 30, 2019 at 11:50 PM Nick Desaulniers wrote: > > So __attribute__((always_inline)) doesn't guarantee that code will be > inlined. [...] inline and __attribute__((always_inline)) > are a heuristic laden mess and should not be relied upon. Small note: in GCC, __attribute__((always_inline)) is documented as actually guaranteeing to either inline or error otherwise (although see the remark for indirect calls): "Failure to inline such a function is diagnosed as an error. Note that if such a function is called indirectly the compiler may or may not inline it depending on optimization level and a failure to inline an indirect call may or may not be diagnosed." As for LLVM/Clang, no idea, since it does not say anything about it in the docs -- but from what you say, it is a weaker guarantee. Cheers, Miguel