From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by sourceware.org (Postfix) with ESMTPS id 6A986385801A for ; Wed, 10 Aug 2022 21:27:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6A986385801A Received: by mail-ej1-x631.google.com with SMTP id k26so30073378ejx.5 for ; Wed, 10 Aug 2022 14:27:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc; bh=XKfQAXgF7UukHFiNndls89feCLEOziso8nPRfukhBpo=; b=7hLFlBWrRD9WbKfyL/NlF5+z2Q/RTzUoF6ypYC/ae3X3LuP4JiTmUqjHJ7YvOhouHl j3aiRs/Orzto5G8tUaa/dJ0dqdQRMXYlGutVgAr4fUmbiX2R6kiyNiyvpEkrzbE1JEhG dv2uYhH8rI+5sUxHvE0IZngVbVkJhPDB8ngbRkteNV0uKqiiT2jxg/oFuKAbv8cCEarG T1f8ACwLDPCC5T54epoVEIrgXHo7gOtYGs4zV+N+i87x94WvDMKezrVc6YMpOfBAQt/w M1aPuep0KRrjpj9S3VWp3tX3n3l63DysWHKsBleRoLmdwhOqUTvtjpA4dyEgbj22CQiE XI6g== X-Gm-Message-State: ACgBeo05bXwGp7OqBljJNocGgeiXQyhSp97sxOzL3X0jtj9hBjn/wnvz I31R1dfx3Ioy2e9rmJEvjJRSOahh7AbM+3q5xg8= X-Google-Smtp-Source: AA6agR4nOlV36/+oxz7WoCG8qEx0QLfTd8zUHplmCOR4rKcEydG1f8GZbdF8MfmDsPbb/5+xiWLHmqoU0H/gdEmDXvg= X-Received: by 2002:a17:907:3e28:b0:731:7ee0:add5 with SMTP id hp40-20020a1709073e2800b007317ee0add5mr8737617ejc.215.1660166877296; Wed, 10 Aug 2022 14:27:57 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jonathan Wakely Date: Wed, 10 Aug 2022 23:27:43 +0200 Message-ID: Subject: Re: Checking for built-in functions from build systems To: Luca Bacci Cc: "gcc@gcc.gnu.org" X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gcc@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Aug 2022 21:28:00 -0000 On Wed, 10 Aug 2022, 23:12 Luca Bacci via Gcc, wrote: > > 1. Is inlining of built-ins dependant only on the target architecture and > command-line arguments? > No, I think it can depend on the arguments to the built-in as well. 2. If the answer to 1 is yes, could a __is_builtin_inlined (func) macro be > added to GCC? It should tell whether func is going to be substituted inline > for the given compiler invocation I don't think that can work for some built-ins, e.g. in a single translation unit memcmp can be inlined for constant arguments of small size, and not inlined for other calls.