From patchwork Thu Aug 8 12:18:48 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Tobias Burnus X-Patchwork-Id: 1970524 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.a=rsa-sha256 header.s=20230601 header.b=kr0yM0UV; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4WfmLV4ldmz1ydk for ; Thu, 8 Aug 2024 22:19:14 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 5B634385AC29 for ; Thu, 8 Aug 2024 12:19:12 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x32d.google.com (mail-wm1-x32d.google.com [IPv6:2a00:1450:4864:20::32d]) by sourceware.org (Postfix) with ESMTPS id 7FB1B3858414 for ; Thu, 8 Aug 2024 12:18:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7FB1B3858414 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=baylibre.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 7FB1B3858414 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::32d ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1723119533; cv=none; b=JgPZxKdesbxK7JPVjlPkw+0qzijYpwTnyeR91f/jqyGb0dxHe3ADQE6IUJnpVFA86OKvJWXvMgkeGEOYr9FkUyReXWIGrn/N71V4vV3xLN/nYxeRhaOiEjlaTAYmIkjIacwVLCdFMS2qlg/FlsujJ5vpu93Lqa24O1d6ZkQo/9k= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1723119533; c=relaxed/simple; bh=yHt9e1Dm9QnuFxLprvQFW2rDJVem0WgIYvnhpV3sE+Q=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=kzkS71xifxwhJ7xX+hyHsCa0vHBIczSnLivVOK04vq5Y2jLWqtQUI6k8Ucd86zkFFeJGiF3jhnsMboFlkvlZ3/iPINj7Nosj1XcC8NmN6LCK0S7SB90gmeeIM+A8AZSkk0jA70DyNoEGY9v9s6L7JT25n/yr45ZBCa6rtAP1a3E= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-4280b3a7efaso6416985e9.0 for ; Thu, 08 Aug 2024 05:18:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1723119530; x=1723724330; darn=gcc.gnu.org; h=in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to; bh=rxd3UGsQNiZgYhx29ZLZW1GBLps1iP0kCcGG6W5bKPU=; b=kr0yM0UVUm1j2zlJe42DexjTMsSDrAVCVL76eC22j5beeKZXC4IY0Jg/BlJd/nvlcf 2jcla7Jchy5XgrVJxMlUvZP4TKb40eXXELsGONWqXnKbDo7CQM+oc8kNhjzAk+Ol31mo p9thvWt+ASpepMjIsb1Q+r3Vdy2v+buFT9282Cbsxl2V7be4HM5LDTUQX4Xpy8geY+lt W5ZpuKS9l7kurb/1KZxO/xmROXf1BE93EozYaNEcBTim9wfAU8c4csw17E5KnWDrBfLl NYZy9LROV5eat4SPSyD5G+V9WlT02pAJzdilQqh9fKcp1icgvKqrDa2S+fGiV2qE/SQI JlkA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723119530; x=1723724330; h=in-reply-to:from:content-language:references:cc:to:subject :user-agent:mime-version:date:message-id:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=rxd3UGsQNiZgYhx29ZLZW1GBLps1iP0kCcGG6W5bKPU=; b=jerwfyGa8KXYKpqBFOYiVNSfGXmO0mYhRyj9PZsHNZa/Y53eqqfU08a8mdY6khtCna d4IAc97C8yr/ezyP+CgZGvVi2tw09f+8yOe/Ene5wQsqV/1bMJAfiBvaF0+2WmuMetTG F1PtqHD+syCTQL/dSqzOy3NHpPoJvu3RfBUlv5rCqcLe9RoJqr1j7HoZ9LLOKx699Q2C Z0jQzErxs2cNG8uCJIzUWYaRtKNkwKW/gyZdwInd8TVstvEEBVYfFa3Cwbov28KSyRiH mJUyOKzfFSDSvpx7+Llj6KtgJOGA+j/KFpHw0Cqp/vP+VCC6dclMOXWGPiheFq8FgX95 lIQQ== X-Gm-Message-State: AOJu0YwXoJQZvb8H2h6RhX/y/c7ir1i3DRNfXyStQsXSHYCAhqJ9Glnk 2KS4gRrk7kNOjK5w9mRcYN2+deCRuIQ4PaGS5OMlCVfqej9GRH0855lkiftQ2LI77HAHZkYPsAt UY14= X-Google-Smtp-Source: AGHT+IHpnlZRb4sH1tnfLnrYAzmuNG3RxmDQOgmDqhBXg1kpYf7rzgEKdkbQSNVK4gS9UgZKmEp5CQ== X-Received: by 2002:a05:600c:5249:b0:428:1846:4f0 with SMTP id 5b1f17b1804b1-4290aebb2cfmr11944785e9.16.1723119529958; Thu, 08 Aug 2024 05:18:49 -0700 (PDT) Received: from ?IPV6:2001:16b8:2676:1a00:fae7:f002:1ada:2d8b? (200116b826761a00fae7f0021ada2d8b.dip.versatel-1u1.de. [2001:16b8:2676:1a00:fae7:f002:1ada:2d8b]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-429059a5e71sm72572775e9.35.2024.08.08.05.18.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 08 Aug 2024 05:18:49 -0700 (PDT) Message-ID: <87a85079-ccab-4e04-ab92-fbaac359b4d7@baylibre.com> Date: Thu, 8 Aug 2024 14:18:48 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: [Patch] libgomp/libgomp.texi: Mention -fno-builtin-omp_is_initial_device (was: Re: [PATCH, v3] OpenMP: Constructors and destructors for "declare target" static aggregates) To: gcc-patches@gcc.gnu.org Cc: Jakub Jelinek , Sandra Loosemore References: <20230512120247.3213280-1-julian@codesourcery.com> <389518c1-7db2-4eb2-8cba-21a2ae51d2a8@baylibre.com> <7b02214c-97cc-484e-ba5e-707723cdaf2b@baylibre.com> Content-Language: en-US From: Tobias Burnus In-Reply-To: X-Spam-Status: No, score=-12.0 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces~incoming=patchwork.ozlabs.org@gcc.gnu.org Document  -fno-builtin-omp_is_initial_device as discussed: Jakub Jelinek wrote: >> RFC: Should be document this new built-in some where? If so, where? As part >> of the routine description in libgomp.texi? Or in extend.texi (or even >> invoke.texi)? > I think libgomp.texi in the omp_is_initial_device description, mention > that the compiler folds it by default and that if that is undesirable, > there is this option to use. Unless there are wording suggestions, I will commit it later today. Tobias libgomp/libgomp.texi: Mention -fno-builtin-omp_is_initial_device libgomp/ChangeLog: * libgomp.texi (omp_is_initial_device): Mention -fno-builtin-omp_is_initial_device and folding by default. diff --git a/libgomp/libgomp.texi b/libgomp/libgomp.texi index c6759dd03bc..96cc0e4baa8 100644 --- a/libgomp/libgomp.texi +++ b/libgomp/libgomp.texi @@ -1754,6 +1754,10 @@ This function returns @code{true} if currently running on the host device, @code{false} otherwise. Here, @code{true} and @code{false} represent their language-specific counterparts. +Note that in GCC this value is already folded to a constant in the compiler; +compile with @option{-fno-builtin-omp_is_initial_device} if a run-time function +is desired. + @item @emph{C/C++}: @multitable @columnfractions .20 .80 @item @emph{Prototype}: @tab @code{int omp_is_initial_device(void);}