From nobody Thu Oct 24 07:03:21 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4XYxhT5GmJz5b9K6; Thu, 24 Oct 2024 07:03:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XYxhT4fz7z4WYv; Thu, 24 Oct 2024 07:03:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729753401; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V2fnZWFulEvT4Qx8QlGCM2SGaHMNbzKwsmVUWOmnWbk=; b=GPtRF+TbkajFNeCGwRpwz4y5KuQCwGfHV1Cs+n4QRtuG3V0qmEPbkfeh2RCQn8Hxvs8n+R YD32qclCse2oeTV7VDElXKsIPdg9AIZaOHHniOl+zDjw0utoK5Moj/ymeEFJpIlR52VZu/ m42Lzb5+kPAA6z5emQpfsFKh7JMbJ3XHW+7vScaxYnD3ONlqwqBQD3WoQF+i9QdFPY1icv pOrhQ6p236wUcg/BKgNwb1KcQVoeHeXy3xSOas1ikeCz7NRFnrTN33dO/7q6FjMMil2i5i 9IVCyejWz7P4Ee0B36iw5/e1RtAfrz6rkDltdQU1snqsrj35mwhseRhhXES1Wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1729753401; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=V2fnZWFulEvT4Qx8QlGCM2SGaHMNbzKwsmVUWOmnWbk=; b=IVqbxBN7WhQZlPhGBbD6cvDKkYjeN4jnBjQ7Q9c9HflYN4JbwsdKaZ6VDIA/fKb0fjCI5y q85HhRrQRRkz+c7qBnLyUZsGmnaDWON9VScsg3ZwUNt90+Yhl9lQq4auXgjooIfeF7YEI2 g5w46JgrsNKep9Ce2fUfe14qfwCTKBjLMe5KlhhOlWDu5Q8ktzOZFQCp1/32Vt5UwespWc K9Cvm+SKXUwH5kcypYiB7ZDP4XPwsYGlmV9lhtWUxrdg2aLHmcdzXPxlfDZOUtbLzCWZ2a Op+/1tKaF6QbbyLEXsilPTUdIQJnfu1kxBHI7kasX0N9u4Slo4GJV9rAEiJXJg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1729753401; a=rsa-sha256; cv=none; b=ygVYYAQhfM9j/gq13V/xcsMl1bKwTceM2oyDOuUqaBB1mWUTFucsFS3aBCX3jhZ/apGQP+ 71y7KXayWSnfjJV7PoiMq1m3qqHyRa4U7Td7K0QQ1U/XAGZfINIj8l51zJ8rQgKiUnkPLc lcAX2M3MqJp71TLNZ6vbmQ95WgVeo582DLjJ5UJP+OZTmmj84visIQUDaEwdKfJfnP4n8r xsz6zGKaG+tM2nHoTXyKRl9F5I+1yX3OrQ8AlAFwKo6wYr3GjF0qN2/StiDKse7phBsZV5 Z6s5dKxB0aCWT2f056XaHuO1NtZXlgzO6xHCveQjcEx3/S8NGix3O8a1U2w6Sg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XYxhT48pFzYQV; Thu, 24 Oct 2024 07:03:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49O73L9u069597; Thu, 24 Oct 2024 07:03:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49O73Ldv069594; Thu, 24 Oct 2024 07:03:21 GMT (envelope-from git) Date: Thu, 24 Oct 2024 07:03:21 GMT Message-Id: <202410240703.49O73Ldv069594@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: a5b1eecbed07 - main - Apply workaround for building llvm-project with WITHOUT_LLVM_ASSERTIONS List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a5b1eecbed07519c637095e3291b9cbd9748e823 Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=a5b1eecbed07519c637095e3291b9cbd9748e823 commit a5b1eecbed07519c637095e3291b9cbd9748e823 Author: Dimitry Andric AuthorDate: 2024-10-24 07:02:54 +0000 Commit: Dimitry Andric CommitDate: 2024-10-24 07:03:02 +0000 Apply workaround for building llvm-project with WITHOUT_LLVM_ASSERTIONS Some internal checking functions should only be declared when both NDEBUG and LLVM_ENABLE_ABI_BREAKING_CHECKS are undefined, otherwise you would get compile errors similar to: /usr/src/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:921:13: error: no member named 'VerifyDAGDivergence' in 'llvm::SelectionDAG' 921 | CurDAG->VerifyDAGDivergence(); | ~~~~~~ ^ Adjust the conditions for declaring and using these functions. This has also been reported upstream. Reported by: cy PR: 280562 MFC after: 1 month --- .../llvm/include/llvm/CodeGen/SelectionDAG.h | 2 +- .../llvm/include/llvm/CodeGen/SelectionDAGISel.h | 2 +- .../llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 2 +- .../llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 18 +++++++++--------- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/contrib/llvm-project/llvm/include/llvm/CodeGen/SelectionDAG.h b/contrib/llvm-project/llvm/include/llvm/CodeGen/SelectionDAG.h index 16ec65f2e7da..9c0220055f38 100644 --- a/contrib/llvm-project/llvm/include/llvm/CodeGen/SelectionDAG.h +++ b/contrib/llvm-project/llvm/include/llvm/CodeGen/SelectionDAG.h @@ -582,7 +582,7 @@ public: return Root; } -#ifndef NDEBUG +#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS void VerifyDAGDivergence(); #endif diff --git a/contrib/llvm-project/llvm/include/llvm/CodeGen/SelectionDAGISel.h b/contrib/llvm-project/llvm/include/llvm/CodeGen/SelectionDAGISel.h index aa0efa5d9bf5..0c23e80a0ac5 100644 --- a/contrib/llvm-project/llvm/include/llvm/CodeGen/SelectionDAGISel.h +++ b/contrib/llvm-project/llvm/include/llvm/CodeGen/SelectionDAGISel.h @@ -55,7 +55,7 @@ public: AssumptionCache *AC = nullptr; GCFunctionInfo *GFI = nullptr; SSPLayoutInfo *SP = nullptr; -#if LLVM_ENABLE_ABI_BREAKING_CHECKS +#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS TargetTransformInfo *TTI = nullptr; #endif CodeGenOptLevel OptLevel; diff --git a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 02d44cd36ae5..63213e276d22 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -11623,7 +11623,7 @@ void SelectionDAG::CreateTopologicalOrder(std::vector &Order) { } } -#ifndef NDEBUG +#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS void SelectionDAG::VerifyDAGDivergence() { std::vector TopoOrder; CreateTopologicalOrder(TopoOrder); diff --git a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index b961d3bb1fec..74bd1fdb887c 100644 --- a/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/contrib/llvm-project/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -916,7 +916,7 @@ void SelectionDAGISel::CodeGenAndEmitDAG() { << "'\n"; CurDAG->dump()); -#if LLVM_ENABLE_ABI_BREAKING_CHECKS +#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS if (TTI->hasBranchDivergence()) CurDAG->VerifyDAGDivergence(); #endif @@ -936,7 +936,7 @@ void SelectionDAGISel::CodeGenAndEmitDAG() { << "'\n"; CurDAG->dump()); -#if LLVM_ENABLE_ABI_BREAKING_CHECKS +#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS if (TTI->hasBranchDivergence()) CurDAG->VerifyDAGDivergence(); #endif @@ -958,7 +958,7 @@ void SelectionDAGISel::CodeGenAndEmitDAG() { << "'\n"; CurDAG->dump()); -#if LLVM_ENABLE_ABI_BREAKING_CHECKS +#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS if (TTI->hasBranchDivergence()) CurDAG->VerifyDAGDivergence(); #endif @@ -982,7 +982,7 @@ void SelectionDAGISel::CodeGenAndEmitDAG() { << "'\n"; CurDAG->dump()); -#if LLVM_ENABLE_ABI_BREAKING_CHECKS +#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS if (TTI->hasBranchDivergence()) CurDAG->VerifyDAGDivergence(); #endif @@ -1000,7 +1000,7 @@ void SelectionDAGISel::CodeGenAndEmitDAG() { << "'\n"; CurDAG->dump()); -#if LLVM_ENABLE_ABI_BREAKING_CHECKS +#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS if (TTI->hasBranchDivergence()) CurDAG->VerifyDAGDivergence(); #endif @@ -1016,7 +1016,7 @@ void SelectionDAGISel::CodeGenAndEmitDAG() { << "'\n"; CurDAG->dump()); -#if LLVM_ENABLE_ABI_BREAKING_CHECKS +#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS if (TTI->hasBranchDivergence()) CurDAG->VerifyDAGDivergence(); #endif @@ -1036,7 +1036,7 @@ void SelectionDAGISel::CodeGenAndEmitDAG() { << "'\n"; CurDAG->dump()); -#if LLVM_ENABLE_ABI_BREAKING_CHECKS +#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS if (TTI->hasBranchDivergence()) CurDAG->VerifyDAGDivergence(); #endif @@ -1056,7 +1056,7 @@ void SelectionDAGISel::CodeGenAndEmitDAG() { << "'\n"; CurDAG->dump()); -#if LLVM_ENABLE_ABI_BREAKING_CHECKS +#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS if (TTI->hasBranchDivergence()) CurDAG->VerifyDAGDivergence(); #endif @@ -1076,7 +1076,7 @@ void SelectionDAGISel::CodeGenAndEmitDAG() { << "'\n"; CurDAG->dump()); -#if LLVM_ENABLE_ABI_BREAKING_CHECKS +#if !defined(NDEBUG) && LLVM_ENABLE_ABI_BREAKING_CHECKS if (TTI->hasBranchDivergence()) CurDAG->VerifyDAGDivergence(); #endif