[llvm] [clang] [HLSL][SPIR-V] Add Vulkan to target triple (PR #76749)

2024-01-18 Thread Natalie Chouinard via cfe-commits
sudonatalie wrote: Rebased due to conflicts. I'm going to go ahead and merge this today to make the next dependent change easier to review, but DXIL folks please still feel free to follow-up if there are any concerns. (Also, ignoring the code formatter bot since it seems to be an existing int

[llvm] [clang] [HLSL][SPIR-V] Add Vulkan to target triple (PR #76749)

2024-01-18 Thread Natalie Chouinard via cfe-commits
https://github.com/sudonatalie updated https://github.com/llvm/llvm-project/pull/76749 >From 0aa15ea1cc6cec12bc347aff1753a95894fa1677 Mon Sep 17 00:00:00 2001 From: Natalie Chouinard Date: Fri, 15 Dec 2023 20:50:43 + Subject: [PATCH 1/4] [HLSL][SPIR-V] Add Vulkan to target triple Add suppo

[llvm] [clang] [HLSL][SPIR-V] Add Vulkan to target triple (PR #76749)

2024-01-03 Thread Natalie Chouinard via cfe-commits
@@ -3,29 +3,39 @@ // Supported targets // // RUN: %clang -target dxil-unknown-shadermodel6.2-compute %s -S -o /dev/null 2>&1 | FileCheck --allow-empty --check-prefix=CHECK-VALID %s -// RUN: %clang -target spirv-unknown-shadermodel6.2-compute %s -S -o /dev/null 2>&1 | FileChec

[llvm] [clang] [HLSL][SPIR-V] Add Vulkan to target triple (PR #76749)

2024-01-03 Thread Natalie Chouinard via cfe-commits
@@ -1328,6 +1331,31 @@ VersionTuple Triple::getDriverKitVersion() const { } } +VersionTuple Triple::getVulkanVersion() const { + if (getArch() != spirv || getOS() != Vulkan) +llvm_unreachable("invalid Vulkan SPIR-V triple"); + + VersionTuple VulkanVersion = getOSVersio

[llvm] [clang] [HLSL][SPIR-V] Add Vulkan to target triple (PR #76749)

2024-01-03 Thread Natalie Chouinard via cfe-commits
@@ -4236,20 +4236,35 @@ bool CompilerInvocation::ParseLangArgs(LangOptions &Opts, ArgList &Args, // TODO: Revisit restricting SPIR-V to logical once we've figured out how to // handle PhysicalStorageBuffer64 memory model if (T.isDXIL() || T.isSPIRVLogical()) { -

[llvm] [clang] [HLSL][SPIR-V] Add Vulkan to target triple (PR #76749)

2024-01-03 Thread Natalie Chouinard via cfe-commits
https://github.com/sudonatalie updated https://github.com/llvm/llvm-project/pull/76749 >From 6141382cebfe0a40c054b2ce7539ec6ff85f3c14 Mon Sep 17 00:00:00 2001 From: Natalie Chouinard Date: Fri, 15 Dec 2023 20:50:43 + Subject: [PATCH 1/2] [HLSL][SPIR-V] Add Vulkan to target triple Add suppo

[llvm] [clang] [HLSL][SPIR-V] Add Vulkan to target triple (PR #76749)

2024-01-03 Thread Nathan Gauër via cfe-commits
https://github.com/Keenuts commented: LGTM for the logic, and choices. Just some small nits https://github.com/llvm/llvm-project/pull/76749 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[llvm] [clang] [HLSL][SPIR-V] Add Vulkan to target triple (PR #76749)

2024-01-03 Thread Nathan Gauër via cfe-commits
@@ -1328,6 +1331,31 @@ VersionTuple Triple::getDriverKitVersion() const { } } +VersionTuple Triple::getVulkanVersion() const { + if (getArch() != spirv || getOS() != Vulkan) +llvm_unreachable("invalid Vulkan SPIR-V triple"); + + VersionTuple VulkanVersion = getOSVersio

[llvm] [clang] [HLSL][SPIR-V] Add Vulkan to target triple (PR #76749)

2024-01-03 Thread Nathan Gauër via cfe-commits
https://github.com/Keenuts edited https://github.com/llvm/llvm-project/pull/76749 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits