[PATCH] D133993: [HLSL] Remove global ctor/dtor variable for non-lib profile.

2022-09-20 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/lib/CodeGen/CGHLSLRuntime.cpp:208 + // ctors/dtors added for entry. + Triple T(M.getTargetTriple()); + if (T.getEnvironment() != Triple::EnvironmentType::Library) { python3kgae wrote: > beanz wrote: > > I question

[PATCH] D134319: [HLSL] add ceil library function

2022-09-20 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. For this builtin you should be able to use `__builtin_elementwise_ceil` for all the overload cases, and you should be able to add the vector cases too. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134319/new/ https://review

[PATCH] D134326: [HLSL] Allow SV_GroupIndex for lib profile.

2022-09-21 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/lib/Sema/SemaDeclAttr.cpp:6901 +// FIXME: it is OK for a compute shader entry and pixel shader entry live in +// same HLSL file. uint32_t Pipeline = I think the underlying issue here is that some attrib

[PATCH] D134326: [HLSL] Allow SV_GroupIndex for lib profile.

2022-09-21 Thread Chris Bieneman via Phabricator via cfe-commits
beanz accepted this revision. beanz added a comment. This revision is now accepted and ready to land. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134326/new/ https://reviews.llvm.org/D134326 ___

[PATCH] D130131: [HLSL] CodeGen hlsl cbuffer/tbuffer.

2022-09-22 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. This is looking great. Thank you for all your work iterating on this. Please update the description to reflect the changes in implementation. Comment at: clang/lib/CodeGen/CGHLSLRuntime.cpp:120 + +void addResourceBinding(GlobalVariable *GV, CGHLSLRuntime

[PATCH] D131799: [HLSL] clang codeGen for HLSLNumThreadsAttr

2022-09-22 Thread Chris Bieneman via Phabricator via cfe-commits
beanz accepted this revision. beanz added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131799/new/ https://reviews.llvm.org/D131799 ___ c

[PATCH] D134304: [Docs] [HLSL] Add IR reference for HLSL

2022-09-22 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 462299. beanz added a comment. Updating documentation for `hlsl.uavs`, thanks @python3kgae! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134304/new/ https://reviews.llvm.org/D134304 Files: clang/docs/HLSL/HLS

[PATCH] D134304: [Docs] [HLSL] Add IR reference for HLSL

2022-09-23 Thread Chris Bieneman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd20f9f8d2177: [Docs] [HLSL] Add IR reference for HLSL (authored by beanz). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134304/new/ https://reviews.llvm.or

[PATCH] D134693: [CMake] Add `CLANG_ENABLE_HLSL` CMake option

2022-09-26 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: phosek, smeenai, compnerd. Herald added a subscriber: Anastasia. Herald added a project: All. beanz requested review of this revision. Herald added a project: clang. The HLSL support in clang is in proress and not fully functioning. As such we do

[PATCH] D134693: [CMake] Add `CLANG_ENABLE_HLSL` CMake option

2022-09-27 Thread Chris Bieneman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGe432108bf254: [CMake] Add `CLANG_ENABLE_HLSL` CMake option (authored by beanz). Changed prior to commit: https://reviews.llvm.org/D134693?vs=463079&id=463275#toc Repository: rG LLVM Github Monorepo

[PATCH] D134637: clang-tblgen build: avoid duplicate inclusion of libLLVMSupport

2022-09-28 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. I think this approach mostly looks sane to me. @phosek, and @Ericson2314 may have different feedback. Comment at: clang/lib/Support/CMakeLists.txt:23 + # libLLVM-*.so). + llvm_add_library(clangSupport_tablegen +STATIC Unless there

[PATCH] D133983: [HLSL] Add SV_DispatchThreadID

2022-09-30 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/lib/CodeGen/CGHLSLRuntime.cpp:167 + for (const auto &Param : Fn->args()) { +if (Param.hasStructRetAttr()) { + // FIXME: support output. I might be missing something, but I'm not seeing a test that exercises

[PATCH] D133983: [HLSL] Add SV_DispatchThreadID

2022-09-30 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/lib/CodeGen/CGHLSLRuntime.cpp:167 + for (const auto &Param : Fn->args()) { +if (Param.hasStructRetAttr()) { + // FIXME: support output. python3kgae wrote: > beanz wrote: > > I might be missing something, bu

[PATCH] D135110: [NFC] [HLSL] Move common metadata to LLVMFrontend

2022-10-03 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: python3kgae, tschuett, jdoerfert, bogner, pow2clk, tex3d, Anastasia, efriedma. Herald added a subscriber: hiraditya. Herald added a project: All. beanz requested review of this revision. Herald added projects: clang, LLVM. This change pulls some

[PATCH] D135110: [NFC] [HLSL] Move common metadata to LLVMFrontend

2022-10-04 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. In D135110#3832728 , @tschuett wrote: > The OpenMP frontend is mainly an IRBuilder. It is a different layering than > for HLSL. Are there plans for an HLSL(IR)Builder? HLSL and OpenMP are different in a lot of ways. HLSL's code ge

[PATCH] D134330: [Docs] [HLSL] Add note about PCH support

2022-10-04 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/docs/HLSL/HLSLSupport.rst:98 +``HLSLExternalSemaSource`` will create new decls and use the old decls as +argument for setPreviousDecl. + We can probably generalize this to something like: ``` When precompiled headers

[PATCH] D130131: [HLSL] CodeGen hlsl cbuffer/tbuffer.

2022-10-04 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a reviewer: asl. beanz added a subscriber: asl. beanz added a comment. +@asl for codegen owner perspective. This LGTM too. The changes here are well isolated to HLSL, so they should have no adverse impact on other language support. @efriedma, @asl & @rjmccall any feedback? Reposit

[PATCH] D133993: [HLSL] Remove global ctor/dtor variable for non-lib profile.

2022-10-06 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. In D133993#3816526 , @efriedma wrote: > Why are we using different mechanisms for global constructors in "libraries" > vs. other code? If we need a mechanism in LLVM already, we might as well use > it all the time? To elaborate

[PATCH] D133993: [HLSL] Remove global ctor/dtor variable for non-lib profile.

2022-10-06 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. @efriedma, I think that's a great suggestion. @python3kgae, if you don't adjust this patch, can you file an issue for that so that we don't lose that feedback? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133993/new/ https:

[PATCH] D133983: [HLSL] Add SV_DispatchThreadID

2022-10-07 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/lib/CodeGen/CGHLSLRuntime.cpp:135 +llvm::Function *DxThreadID = CGM.getIntrinsic(Intrinsic::dx_thread_id); +// dx_thread_id +return buildVectorInput(B, DxThreadID, Ty); nit: this comment doesn't add value

[PATCH] D133668: [HLSL] Use _BitInt(16) for int16_t to avoid promote to int.

2022-10-09 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. Avoiding argument promotion is one part of what we need, but not all of it. For example if you take this trial code: const RWBuffer In; RWBuffer Out; [numthreads(1,1,1)] void main(uint GI : SV_GroupIndex) { Out[GI] = In[GI].x + In[GI].y; } Following C rul

[PATCH] D135595: [HLSL] Add utility to convert environment to stage

2022-10-10 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: aaron.ballman, MaskRay, klimek, python3kgae, pow2clk. Herald added subscribers: Anastasia, StephenFan. Herald added a project: All. beanz requested review of this revision. Herald added a project: clang. We had a bunch of places in the code where

[PATCH] D135595: [HLSL] Add utility to convert environment to stage

2022-10-10 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. In D135595#3847056 , @python3kgae wrote: > Backend needs the same thing. > Is it possible to move this to llvm and share it between frontend and backend? This translates the triple to a clang-defined enum... so strictly speaking n

[PATCH] D135595: [HLSL] Add utility to convert environment to stage

2022-10-10 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. Worth noting, we do have a similar set of static_asserts in Triple.cpp to validate the ordering of enum cases and that the subtraction results in the appropriate values: https://github.com/llvm/llvm-project/blob/main/llvm/lib/Support/Triple.cpp#L1942 Repository: rG LL

[PATCH] D133668: [HLSL] Use _BitInt(16) for int16_t to avoid promote to int.

2022-10-10 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. In D133668#3847163 , @rjmccall wrote: > Sure, but it's extremely easy to unpromote that arithmetic for most > operators, and I'm sure LLVM already has a pass that will do that. Okay... but HLSL explicitly doesn't promote. Having t

[PATCH] D133668: [HLSL] Use _BitInt(16) for int16_t to avoid promote to int.

2022-10-10 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. In D133668#3847871 , @rjmccall wrote: > But that's purely on the implementation level, right? Everything is > implicitly vectorized and you're just specifying the computation of a single > lane, but as far as that lane-wise compu

[PATCH] D135595: [HLSL] Add utility to convert environment to stage

2022-10-10 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. We should absolutely add utility functions when we have uses for them. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135595/new/ https://reviews.llvm.org/D135595 ___ cfe-commits ma

[PATCH] D135721: [HLSL] Added HLSL this as a reference

2022-10-11 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a reviewer: aaron.ballman. beanz added a subscriber: aaron.ballman. beanz added a comment. Looping in @aaron.ballman here too because this is a bit of a fun one... I know Aaron loves when we show him the best of HLSL 😄 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D135595: [HLSL] Add utility to convert environment to stage

2022-10-12 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/include/clang/Basic/HLSLRuntime.h:39 + return static_cast(Pipeline); +} + bogner wrote: > You're not actually introducing the dependency here (it was already there), > but neither `ShaderStage` in LangOptions.h nor

[PATCH] D135595: [HLSL] Add utility to convert environment to stage

2022-10-12 Thread Chris Bieneman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG19a0a5674911: [HLSL] Add utility to convert environment to stage (authored by beanz). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm

[PATCH] D135060: [HLSL] Add groupshare address space.

2022-10-12 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/include/clang/Basic/Attr.td:4063 + let Spellings = [Keyword<"groupshared">]; + let Documentation = [HLSLGroupSharedAddressSpaceDocs]; +} Shouldn't this have `let Subjects = SubjectList<[Var]>;`? I don't think we s

[PATCH] D135060: [HLSL] Add groupshare address space.

2022-10-12 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/test/ParserHLSL/group_shared.hlsl:11 +// expected-warning@+1 {{'auto' type specifier is a C++11 extension}} +auto l = []() groupshared {}; + What happens to this if you set the language standard to hlsl 202x? I setu

[PATCH] D135110: [NFC] [HLSL] Move common metadata to LLVMFrontend

2022-10-13 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 467606. beanz added a comment. Rebasing Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135110/new/ https://reviews.llvm.org/D135110 Files: clang/lib/CodeGen/CGHLSLRuntime.cpp clang/lib/CodeGen/CMakeLists.txt

[PATCH] D135110: [NFC] [HLSL] Move common metadata to LLVMFrontend

2022-10-13 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: llvm/lib/Target/DirectX/DXILResource.h:46 // can only be added to the end, and not removed. enum class Kinds : uint32_t { Invalid = 0, python3kgae wrote: > Could we move ResourceBase::Kinds to Frontend/HLSL/HLSL

[PATCH] D135973: Move HLSL builtins into hlsl namespace

2022-10-14 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: python3kgae, pow2clk, bob80905. Herald added a subscriber: Anastasia. Herald added a project: All. beanz requested review of this revision. Herald added a project: clang. Should have done this from the start. Since all the injected AST types are

[PATCH] D135110: [NFC] [HLSL] Move common metadata to LLVMFrontend

2022-10-14 Thread Chris Bieneman via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG911d2dc23035: [NFC] [HLSL] Move common metadata to LLVMFrontend (authored by beanz). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D130951: [HLSL] CodeGen hlsl resource binding.

2022-10-14 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/include/clang/Basic/HLSLRuntime.h:31 +// NOTE: keep sync with ResourceBase::Kinds in DirectX backend. +enum class ResourceKind : uint32_t { + Invalid = 0, If this is only used in the clangCodeGen library, we can mov

[PATCH] D130951: [HLSL] CodeGen hlsl resource binding.

2022-10-17 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/lib/CodeGen/CGHLSLRuntime.h:73 CodeGenModule &CGM; uint32_t ResourceCounters[static_cast( hlsl::ResourceClass::NumClasses)] = {0}; The `ResourceCounters` here was a stand-in for allocating resource indic

[PATCH] D130951: [HLSL] CodeGen hlsl resource binding.

2022-10-17 Thread Chris Bieneman via Phabricator via cfe-commits
beanz accepted this revision. beanz added inline comments. This revision is now accepted and ready to land. Comment at: clang/lib/CodeGen/CGHLSLRuntime.h:73 CodeGenModule &CGM; uint32_t ResourceCounters[static_cast( hlsl::ResourceClass::NumClasses)] = {0}; --

[PATCH] D136031: [DirectX backend] support ConstantBuffer to DXILResource.h

2023-01-03 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. It is probably worth adding some unit tests to test the `CBufferDataLayout` class. I think the meat of this change is fine. This code mixes `unsigned` and `uint32_t` interchangeably. They aren't required by the language to be the same. I have a general preference toward

[PATCH] D135721: [HLSL] Added HLSL this as a reference

2022-11-03 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/lib/Sema/HLSLExternalSemaSource.cpp:179 +AST, SourceLocation(), +Constructor->getThisType().getTypePtr()->getPointeeType(), true); +This->setValueKind(ExprValueKind::VK_LValue); aaron.ballman wrot

[PATCH] D135721: [HLSL] Added HLSL this as a reference

2022-11-04 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/test/AST/HLSL/RWBuffer-AST.hlsl:49-50 // CHECK-NEXT: ArraySubscriptExpr 0x{{[0-9A-Fa-f]+}} <> 'element_type' lvalue -// CHECK-NEXT: MemberExpr 0x{{[0-9A-Fa-f]+}} <> 'element_type *' lvalue ->h 0x{{[0-9A-Fa-f]+}} -// CHECK-NEXT: CX

[PATCH] D141705: [HLSL] [Dirver] add dxv as a Driver Action Job

2023-01-26 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/include/clang/Basic/DiagnosticDriverKinds.td:687 +def warn_drv_dxc_missing_dxv : Warning<"dxv not found." +" Resulting DXIL will not be signed for use in release environments.">; Not all `dxv` binaries can sign

[PATCH] D141705: [HLSL] [Dirver] add dxv as a Driver Action Job

2023-01-27 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/include/clang/Driver/Types.def:110 TYPE("api-information", API_INFO, INVALID, "json", phases::Precompile) +TYPE("dx-container", DX_CONTAINER, INVALID, "dxc", phases::Compile, phases::B

[PATCH] D140489: Add builtin_elementwise_log

2023-01-31 Thread Chris Bieneman via Phabricator via cfe-commits
beanz accepted this revision. beanz added a comment. This revision is now accepted and ready to land. LGTM. This looks pretty straightforward and similar to other changes you've been making. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D140489/new/

[PATCH] D143208: Repair sphinx doc generation

2023-02-02 Thread Chris Bieneman via Phabricator via cfe-commits
beanz accepted this revision. beanz added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D143208/new/ https://reviews.llvm.org/D143208 ___ c

[PATCH] D136031: [DirectX backend] support ConstantBuffer to DXILResource.h

2023-01-12 Thread Chris Bieneman via Phabricator via cfe-commits
beanz accepted this revision. beanz added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136031/new/ https://reviews.llvm.org/D136031 ___ c

[PATCH] D131052: [CMake] Allow setting the location of host tools with LLVM_NATIVE_TOOL_DIR

2023-01-13 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: llvm/cmake/modules/AddLLVM.cmake:2401 + +macro(setup_host_tool tool_name setting_name exe_var_name target_var_name) + cmake_parse_arguments(ARG "" "SCOPE" "" ${ARGN}) Please make this a `function` instead of a `macro`. In

[PATCH] D131052: [CMake] Allow setting the location of host tools with LLVM_NATIVE_TOOL_DIR

2023-01-13 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. The convention that `find_program` uses is to cache the variables, which causes them to be defined at global scope. That also avoids needing to recompute filesystem lookups in incremental builds, which is desirable. Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[PATCH] D141705: [HLSL] [Dirver] add dxv as a VerifyDebug Job

2023-01-17 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. Re-using the `VerifyDebug` action really doesn't make sense. That's not what the DXIL validator does, and it will be a source of confusion forever. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D141705/new/ https://reviews.ll

[PATCH] D141705: [HLSL] [Dirver] add dxv as a VerifyDebug Job

2023-01-17 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/lib/Driver/Driver.cpp:4215 + // Call validator for dxc. + if (IsDXCMode()) { +Action *LastAction = Actions.back(); Shouldn't the validator only run if we are targeting DXIL? Also we should probably add the `-V

[PATCH] D131052: [CMake] Allow setting the location of host tools with LLVM_NATIVE_TOOL_DIR

2023-01-18 Thread Chris Bieneman via Phabricator via cfe-commits
beanz accepted this revision. beanz added a comment. This revision is now accepted and ready to land. LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D131052/new/ https://reviews.llvm.org/D131052 ___

[PATCH] D136031: [DirectX backend] support ConstantBuffer to DXILResource.h

2023-01-18 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. @python3kgae, this change introduced a bunch of warning spew because it is using an API that was deprecated shortly before the change merged. Can you please address this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136031/

[PATCH] D127802: [HLSL] Support HLSL vector initializers

2022-06-14 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: aaron.ballman, kuhar, python3kgae, MaskRay. Herald added subscribers: Anastasia, StephenFan. Herald added a project: All. beanz requested review of this revision. Herald added a project: clang. In HLSL vectors are ext_vectors in all respects exce

[PATCH] D127802: [HLSL] Support HLSL vector initializers

2022-06-15 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/test/SemaHLSL/BuiltIns/vector-constructors-erros.hlsl:8 +void entry() { + float2 LilVec = float2(1.0, 2.0); + float2 BrokenVec = float2(1.0, 2.0, 3.0); // expected-error{{excess elements in vector initializer}} py

[PATCH] D127579: [clang][WIP] add option to keep types of ptr args for non-kernel functions in metadata

2022-06-15 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. There are numerous changes floating around that boil down to "we need pointer types". Most are SPIR-V & DXIL related. I'm a little concerned that we are generally building a bunch of different approaches to tracking pointer types and not considering a more general solutio

[PATCH] D127579: [clang][WIP] add option to keep types of ptr args for non-kernel functions in metadata

2022-06-15 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. @nikic the most important thing you need to know about SPIR-V is that it is a virtual ISA based on LLVM IR. The ISA itself encodes types for pointers just like LLVM IR would. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127

[PATCH] D127802: [HLSL] Support HLSL vector initializers

2022-06-15 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/test/SemaHLSL/BuiltIns/vector-constructors-erros.hlsl:8 +void entry() { + float2 LilVec = float2(1.0, 2.0); + float2 BrokenVec = float2(1.0, 2.0, 3.0); // expected-error{{excess elements in vector initializer}} aa

[PATCH] D127802: [HLSL] Support HLSL vector initializers

2022-06-15 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/test/SemaHLSL/BuiltIns/vector-constructors-erros.hlsl:12 + float3 BrokenNormie = float3(3.0, 4.0); // expected-error{{too few elements in vector initialization (expected 3 elements, have 2)}} + float3 OverwhemledNormie = float3(3.

[PATCH] D127890: [Docs] Update clang & llvm release notes for HLSL

2022-06-15 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: tstellar, aaron.ballman, MaskRay, hans. Herald added subscribers: Anastasia, StephenFan. Herald added a project: All. beanz requested review of this revision. Herald added projects: clang, LLVM. Adding release note entries for LLVM & Clang to int

[PATCH] D127802: [HLSL] Support HLSL vector initializers

2022-06-16 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 437670. beanz added a comment. Updates based on feedback from @aaron.ballman. Thank you for all the test suggestions, it caught an extra-odd AST generation. Fix included :). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.l

[PATCH] D127890: [Docs] Update clang & llvm release notes for HLSL

2022-06-16 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 437672. beanz added a comment. Updates based on review feedback. Thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127890/new/ https://reviews.llvm.org/D127890 Files: clang/docs/ReleaseNotes.rst llvm/

[PATCH] D128012: [HLSL] Add ExternalSemaSource & vector alias

2022-06-16 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: aaron.ballman, kuhar, bogner, rnk, python3kgae. Herald added subscribers: Anastasia, jeroen.dobbelaere, mgorny. Herald added a project: All. beanz requested review of this revision. Herald added a project: clang. HLSL vector types are ext_vector

[PATCH] D128012: [HLSL] Add ExternalSemaSource & vector alias

2022-06-16 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/lib/Frontend/FrontendAction.cpp:1022 +new HLSLExternalSemaSource()); +CI.getASTContext().setExternalSource(HLSLSema); + } python3kgae wrote: > Does this mean features like PCH which use ExternalSource wi

[PATCH] D128012: [HLSL] Add ExternalSemaSource & vector alias

2022-06-17 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. For just the type alias, adding it during parsing would probably work. Where things get more complicated is we have a whole mess of other data types that we’ll need to add too eventually. One of the advantages of using an external sema source is that we can create incompl

[PATCH] D128012: [HLSL] Add ExternalSemaSource & vector alias

2022-06-17 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. In D128012#3592098 , @Anastasia wrote: > aha, are you having a lot of these types then? Ok that sounds similar problem > to OpenCL builtin functions as we had to go away from a simple header include > due to long parsing time. Ve

[PATCH] D127890: [Docs] Update clang & llvm release notes for HLSL

2022-06-20 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 438419. beanz added a comment. Updates based on feeback from @MaskRay. Thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D127890/new/ https://reviews.llvm.org/D127890 Files: clang/docs/ReleaseNotes.rst

[PATCH] D128012: [HLSL] Add ExternalSemaSource & vector alias

2022-06-21 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. In D128012#3598307 , @Anastasia wrote: > PCH have large in-memory size compared to the sources, but if it's not an > issue then it should be reasonable. Yea... I think we may have some flexibility on memory size. Our current on-d

[PATCH] D127802: [HLSL] Support HLSL vector initializers

2022-06-21 Thread Chris Bieneman via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG9f499d9d73ed: [HLSL] Support HLSL vector initializers (authored by beanz). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:

[PATCH] D126857: [HLSL] Add WaveActiveCountBits as Langugage builtin function for HLSL

2022-06-23 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/include/clang/Basic/Builtins.def:1697 +// HLSL +LANGBUILTIN(WaveActiveCountBits, "Uib", "nc", HLSL_LANG) + python3kgae wrote: > Anastasia wrote: > > python3kgae wrote: > > > Anastasia wrote: > > > > FYI we most of ti

[PATCH] D128569: Start support for HLSL `RWBuffer`

2022-06-24 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: Anastasia, spyffe, kuhar, bogner, python3kgae. Herald added a project: All. beanz requested review of this revision. Herald added a project: clang. Most of the change here is fleshing out the HLSLExternalSemaSource with builder implementations to

[PATCH] D125585: [HLSL][clang][Driver] Parse target profile early to update Driver::TargetTriple.

2022-05-31 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/lib/Driver/Driver.cpp:1249 +// Build TargetTriple from target_profile option for clang-dxc. +if (const Arg *A = Args.getLastArg(options::OPT_target_profile)) { + StringRef TargetProfile = A->getValue();

[PATCH] D125585: [HLSL][clang][Driver] Parse target profile early to update Driver::TargetTriple.

2022-05-31 Thread Chris Bieneman via Phabricator via cfe-commits
beanz accepted this revision. beanz added a comment. This revision is now accepted and ready to land. LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125585/new/ https://reviews.llvm.org/D125585 ___

[PATCH] D156178: [HLSL] add pow library function

2023-07-24 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/test/CodeGenHLSL/builtins/pow.hlsl:6 +// RUN: dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes \ +// RUN: -D__HLSL_ENABLE_16_BIT -o - | FileCheck %s --check-prefix=NO_HALF + Does this need to set

[PATCH] D157149: [Option] Add "Visibility" field and clone the OptTable APIs to use it

2023-08-14 Thread Chris Bieneman via Phabricator via cfe-commits
beanz accepted this revision. beanz added a comment. LGTM. This is definitely an improvement over the awfulness we were doing. Thanks @bogner! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D157149/new/ https://reviews.llvm.org/D157149

[PATCH] D158820: [Sema][HLSL] Fix naming of anyhit/closesthit shaders

2023-08-25 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/test/SemaHLSL/shader_type_attr.hlsl:30 // expected-error@+1 {{'shader' attribute parameters do not match the previous declaration}} +[shader("pixel")] bob80905 wrote: > bogner wrote: > > bob80905 wrote: > > > I d

[PATCH] D159126: [Clang] Add captures to the instantiation scope of lambda call operators

2023-08-29 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. I'll apply this patch and debug the issue today. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159126/new/ https://reviews.llvm.org/D159126 ___ cfe-commits mailing list cfe-commits

[PATCH] D159126: [Clang] Add captures to the instantiation scope of lambda call operators

2023-08-29 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. @cor3ntin, I know what the problem is and I think I can put up a review for a fix tonight or (more likely) tomorrow. Is that okay? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159126/new/ https://reviews.llvm.org/D159126 _

[PATCH] D159126: [Clang] Add captures to the instantiation scope of lambda call operators

2023-08-29 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. Yea, the gist of it is that in HLSL `this` is a reference not a pointer, which means the `CXXThisExpr` is always an LValue. I think the right fix for this is to cleanup the `CXXThisExpr` creation code and create a `CXXThisExpr::Create` method like the other AST nodes. The

[PATCH] D159247: [HLSL] Cleanup support for `this` as an l-value

2023-08-30 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: cor3ntin, aaron.ballman, bogner. Herald added subscribers: Anastasia, ChuanqiXu, martong. Herald added a reviewer: shafik. Herald added a reviewer: NoQ. Herald added a project: All. beanz requested review of this revision. Herald added a project:

[PATCH] D159247: [HLSL] Cleanup support for `this` as an l-value

2023-08-30 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. Full disclosure here, I need to write some more tests for this. It should be NFC for all languages other than HLSL, but I want to spend some time making sure that the tests adequately exercise the HLSL paths (which should also be mostly NFC). Repository: rG LLVM Githu

[PATCH] D159247: [HLSL] Cleanup support for `this` as an l-value

2023-08-31 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. Yea, we could do that approach. It will mean filtering about a few `getNonReferenceType()` calls, which is what I was trying to avoid. That said, it might be the better solution since it can be unconditional and will work for both deducing `this` and HLSL. I'll test it o

[PATCH] D159247: [HLSL] Cleanup support for `this` as an l-value

2023-08-31 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 555118. beanz added a comment. Updating based on review feedback from @core3ntin. Thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159247/new/ https://reviews.llvm.org/D159247 Files: clang/include/clan

[PATCH] D159247: [HLSL] Cleanup support for `this` as an l-value

2023-09-01 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 555380. beanz added a comment. Updating based on PR feedback. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D159247/new/ https://reviews.llvm.org/D159247 Files: clang/include/clang/AST/ExprCXX.h clang/lib/AST

[PATCH] D159247: [HLSL] Cleanup support for `this` as an l-value

2023-09-05 Thread Chris Bieneman via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG400d3261a0da: [HLSL] Cleanup support for `this` as an l-value (authored by beanz). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D69356: [NFC] Rename LLVM_NO_DEAD_STRIP

2019-10-29 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. `LLVM_NO_DEAD_STRIP` isn't actually useful only for when plugins are enabled. It is also useful in a lot of contexts around building JIT host processes. The advantage of the old name was it specified exactly what it did (i.e. not dead strip code). It seems to me that may

[PATCH] D69356: [NFC] Rename LLVM_NO_DEAD_STRIP

2019-10-29 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. In D69356#1726336 , @hubert.reinterpretcast wrote: > Is there some documentation indicating these other use cases? If you have JIT'd code that needs to link against functions exposed in the process running the JIT you can't dead

[PATCH] D69356: [NFC] Rename LLVM_NO_DEAD_STRIP

2019-10-30 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. In D69356#1726527 , @hubert.reinterpretcast wrote: > For your second question: As the patch author indicated, the change to adjust > the behaviour on the affected platform is forthcoming. Your question seems > predicated upon that

[PATCH] D69356: [NFC] Rename LLVM_NO_DEAD_STRIP

2019-10-30 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. In D69356#1727451 , @daltenty wrote: > The intention of LLVM_SUPPORT_PLUGINS was as an internal option set by tools > which may have plugins and need to be built in a specific way (such as > avoiding deadstriping) if plugins are en

[PATCH] D69638: [NFC] Add SUPPORT_PLUGINS to add_llvm_executable()

2019-10-31 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. A few comments inline. Comment at: clang/tools/driver/CMakeLists.txt:34 ${tablegen_deps} + SUPPORT_PLUGINS ) This is now a behavior change because you're always passing this. You'll want to bring back the conditional statement wit

[PATCH] D69638: [NFC] Add SUPPORT_PLUGINS to add_llvm_executable()

2019-11-01 Thread Chris Bieneman via Phabricator via cfe-commits
beanz accepted this revision. beanz added a comment. This revision is now accepted and ready to land. LGTM Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69638/new/ https://reviews.llvm.org/D69638 ___ c

[PATCH] D70280: Remove Support/Options.h, it is unused

2019-11-14 Thread Chris Bieneman via Phabricator via cfe-commits
beanz accepted this revision. beanz added a comment. This revision is now accepted and ready to land. Yea. Unfortunately the migration stalled out because there was no way to make the registration method work with the new pass manager. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D70764: build: reduce CMake handling for zlib

2019-12-04 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. @labath sorry for not replying on-list. I've actually been discussing offline with @compnerd. If `llvm-config` is printing an absolute path, I'm concerned about how that will interact with binary package distributions for the llvm-dev packages. Not sure if @tstellar has a

[PATCH] D70764: build: reduce CMake handling for zlib

2019-12-04 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. I conferred off-list with @compnerd. He and I talked through my concerns, and I believe this patch is fine as-is, so LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70764/new/ https://reviews.llvm.org/D70764 _

[PATCH] D70764: build: reduce CMake handling for zlib

2019-12-17 Thread Chris Bieneman via Phabricator via cfe-commits
beanz accepted this revision. beanz added a comment. This revision is now accepted and ready to land. I think this is good, and it has been sitting a while. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70764/new/ https://reviews.llvm.org/D70764

[PATCH] D68520: [cmake] Fix clang builds with BUILD_SHARED=ON and CLANG_LINK_CLANG_DYLIB=ON

2020-01-22 Thread Chris Bieneman via Phabricator via cfe-commits
beanz accepted this revision. beanz added a comment. Seems reasonable. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68520/new/ https://reviews.llvm.org/D68520 ___ cfe-commits mailing list cfe-commits@

[PATCH] D40194: [libcxxabi][CMake] Provide option to disable installing of the library

2017-11-17 Thread Chris Bieneman via Phabricator via cfe-commits
beanz accepted this revision. beanz added a comment. This revision is now accepted and ready to land. LGTM. Repository: rL LLVM https://reviews.llvm.org/D40194 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/

[PATCH] D40195: [libunwind][CMake] Provide option to disable instalation of the library

2017-11-17 Thread Chris Bieneman via Phabricator via cfe-commits
beanz accepted this revision. beanz added a comment. This revision is now accepted and ready to land. LGTM. Repository: rL LLVM https://reviews.llvm.org/D40195 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/

[PATCH] D145270: Add codegen for llvm exp/exp2 elementwise builtins

2023-03-07 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/docs/LanguageExtensions.rst:642 T __builtin_elementwise_log10(T x) return the base 10 logarithm of x floating point types + T __builtin_elementwise_exp(T x)returns the base-e exp

[PATCH] D149119: [CMake] Use LLVM own tools in extract_symbols.py

2023-05-09 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. One potential area of concern here: If `llvm-driver` is ever extended to work as a plugin loader (thus exporting its symbols), removing support for the pre-installed host tools could cause a cyclic dependency. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D149119/

<    1   2   3   4   5   6   >