[PATCH] D122627: [HLSL] Fix MSFT Attribute parsing, add numthreads

2022-03-31 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. I just pushed one more commit rG19054163e11a6632b4973c936e5aa93ec742c866 that further refines the subject specification and covers the merging attributes and conflicting attributes on the same decl. Th

[PATCH] D122699: [HLSL] Add Semantic syntax, and SV_GroupIndex

2022-03-31 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 419570. beanz added a comment. Updates based on feedback from @aaron.ballman & @MaskRay. Thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122699/new/ https://reviews.llvm.org/D122699 Files: clang/incl

[PATCH] D122699: [HLSL] Add Semantic syntax, and SV_GroupIndex

2022-04-01 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. In D122699#3422298 , @aaron.ballman wrote: > General question about the new syntax -- how does this work on field > declarations of a record? e.g., > > struct S { > int i : SV_GroupIndex; > }; > > (Please tell me the answe

[PATCH] D122699: [HLSL] Add Semantic syntax, and SV_GroupIndex

2022-04-04 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 420376. beanz added a comment. Updating based on feedback from @aaron.ballman I think this covers all the cases for parsing as a function parameter. I haven't added the code to parse these in structure definitions or globals yet. If it is okay I'd like to do

[PATCH] D122865: [HLSL][clang][Driver] Support target profile command line option.

2022-04-05 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added reviewers: pow2clk, rnk, bogner, MaskRay, dexonsmith. beanz added a comment. Herald added a subscriber: StephenFan. Looping in a few extra reviewers, also added some comments below. Comment at: clang/lib/Driver/ToolChains/HLSL.cpp:43 +return false; + if (!Versi

[PATCH] D122865: [HLSL][clang][Driver] Support target profile command line option.

2022-04-05 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/lib/Driver/ToolChains/HLSL.cpp:43 +return false; + if (!Version.getMinor()) +return false; python3kgae wrote: > beanz wrote: > > Do we need to verify this or can we just assume if there is no minor > > vers

[PATCH] D122699: [HLSL] Add Semantic syntax, and SV_GroupIndex

2022-04-05 Thread Chris Bieneman via Phabricator via cfe-commits
beanz marked an inline comment as done. beanz added a comment. Thank you! Will update shortly. Comment at: clang/include/clang/Basic/AttributeCommonInfo.h:47-48 // Note TableGen depends on the order above. Do not add or change the order // without adding related c

[PATCH] D122699: [HLSL] Add Semantic syntax, and SV_GroupIndex

2022-04-05 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 420620. beanz added a comment. Updates based on feedback from @aaron.ballman. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122699/new/ https://reviews.llvm.org/D122699 Files: clang/include/clang/Basic/Attr.td

[PATCH] D123167: [HLSL] Pointers are unsupported in HLSL

2022-04-05 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: aaron.ballman, MaskRay, kuhar, rnk, rsmith. Herald added a subscriber: StephenFan. Herald added a project: All. beanz requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. HLSL does not support

[PATCH] D130018: [HLSL] Add HLSLResource attribute

2022-07-27 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/include/clang/Basic/AttrDocs.td:6473-6475 +The HLSL ``resource`` attribute is not valid to manually specify in +HLSL. It is applied by the compiler to HLSL resource type objects enabling them +to be handled appropriately in CodeGen.

[PATCH] D130055: Clang extensions yolo, woot & kaboom

2022-07-27 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. In D130055#3677743 , @dblaikie wrote: > Any chance this could be a generalization of > https://clang.llvm.org/doxygen/Consumed_8cpp_source.html ? I'm not really familiar with that code, but at glance there seems to be some simila

[PATCH] D130055: Clang extensions yolo, woot & kaboom

2022-07-27 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. In D130055#3683173 , @aaron.ballman wrote: > Are there circumstances where we cannot "simply" infer this from the > constructor itself? I think this gets tricky in cases where objects may have valid "uninitialized" state. Like a

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

2022-07-28 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 rG6e56d0dbe3c8: Start support for HLSL `RWBuffer` (authored by beanz). Changed prior to commit: https://reviews.llvm.org/D128569?vs=442690&id=448326

[PATCH] D130016: [HLSL] Add __builtin_hlsl_create_handle

2022-07-28 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 rGfe13002bb37c: [HLSL] Add __builtin_hlsl_create_handle (authored by beanz). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:

[PATCH] D130017: [HLSL] Add RWBuffer default constructor

2022-07-28 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 rG66eabeb65dc9: [HLSL] Add RWBuffer default constructor (authored by beanz). Changed prior to commit: https://reviews.llvm.org/D130017?vs=445517&id=

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

2022-07-28 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/lib/CodeGen/CGHLSLRuntime.cpp:142 + if (!Inner) { +DiagnosticsEngine &Diags = CGM.getDiags(); +unsigned DiagID = Diags.getCustomDiagID(DiagnosticsEngine::Error, python3kgae wrote: > python3kgae w

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

2022-07-28 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/lib/Basic/Targets/SPIR.h:46 +0, // ptr64 +// HLSL address space values for this map are dummy and they can't be used +0, // hlsl_cbuffer I don’t think you need this comment. Most of those adds space value

[PATCH] D130018: [HLSL] Add HLSLResource attribute

2022-07-28 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 rGcc47db673704: [HLSL] Add HLSLResource attribute (authored by beanz). Changed prior to commit: https://reviews.llvm.org/D130018?vs=445518&id=448500

[PATCH] D130794: [Docs] Add HLSL ResourceType documentation

2022-07-29 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: aaron.ballman, pow2clk, python3kgae, bogner, MaskRay. Herald added subscribers: Anastasia, StephenFan, arphaman. Herald added a project: All. beanz requested review of this revision. Herald added a project: clang. Along with the new documentation

[PATCH] D130019: [HLSL] CodeGen HLSL Resource annotations

2022-08-01 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 449014. beanz added a comment. Updates based on PR feedback. Thanks @aaron.ballman! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130019/new/ https://reviews.llvm.org/D130019 Files: clang/lib/CodeGen/CGDeclCXX

[PATCH] D130019: [HLSL] CodeGen HLSL Resource annotations

2022-08-01 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 rG5dbb92d8cdf7: [HLSL] CodeGen HLSL Resource annotations (authored by beanz). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https

[PATCH] D124751: [HLSL] Support -E option for HLSL.

2022-08-04 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. One very nitpick-y comment, otherwise LGTM. Comment at: clang/lib/Sema/SemaDecl.cpp:9841 +if (!NewFD->isInvalidDecl() && +// Skip operator overload which not identi

[PATCH] D131203: [HLSL] Initial codegen for SV_GroupIndex

2022-08-04 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: aaron.ballman, bogner, jcranmer-intel, python3kgae, pow2clk. Herald added subscribers: Anastasia, arphaman. Herald added a project: All. beanz requested review of this revision. Herald added a project: clang. Semantic parameters aren't passed as

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

2022-08-05 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/lib/CodeGen/CGHLSLRuntime.h:64 CodeGenModule &CGM; uint32_t ResourceCounters[static_cast( hlsl::ResourceClass::NumClasses)] = {0}; Anastasia wrote: > This is not part of this change but any reason why it

[PATCH] D131268: [HLSL] Generate buffer subscript operators

2022-08-05 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: bogner, aaron.ballman, python3kgae, pow2clk. Herald added a subscriber: Anastasia. Herald added a project: All. beanz requested review of this revision. Herald added a project: clang. In HLSL buffer types support array subscripting syntax for loa

[PATCH] D131268: [HLSL] Generate buffer subscript operators

2022-08-05 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/lib/Sema/HLSLExternalSemaSource.cpp:220 + +// Const subscript operators return copies of elements, non-const return a +// reference so that they are assignable. python3kgae wrote: > If we reuse this function

[PATCH] D125655: [HLSL] add -P option for dxc mode.

2022-08-05 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/include/clang/Driver/Options.td:6921 HelpText<"Entry point name">; +def dxc_P : Option<["--", "/", "-"], "P", KIND_SEPARATE>, + Group, Flags<[DXCOption, NoXarchOption]>, This is the same option

[PATCH] D130858: [HLSL] emit-obj when set output.

2022-08-05 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/D130858/new/ https://reviews.llvm.org/D130858 ___ c

[PATCH] D130794: [Docs] Add HLSL ResourceType documentation

2022-08-08 Thread Chris Bieneman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGfc470013d13f: [Docs] Add HLSL ResourceType documentation (authored by beanz). Changed prior to commit: https://reviews.llvm.org/D130794?vs=448699&id=450795#toc Repository: rG LLVM Github Monorepo CH

[PATCH] D129883: [HLSL] Support cbuffer/tbuffer for hlsl.

2022-08-08 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. Since this is adding a new AST node (hopefully the only one we need in HLSL) it would be nice to get @aaron.ballman to take a look here too to make sure this isn't too insane. Comment at: clang/lib/AST/DeclBase.cpp:1191 + if (getDeclKind() == Decl::H

[PATCH] D130033: [HLSL] Add resource binding attribute for HLSL.

2022-08-08 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. I have some nitpick comments about the wording of the errors and docs, but the bigger meta issue is that you've implemented this parsing entirely from scratch, and I suspect this should be sharing parsing logic with the generic semantic parser. I know the parameters them

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

2022-08-09 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/lib/CodeGen/CGHLSLRuntime.cpp:96 + } + Buf.LayoutStruct = llvm::StructType::get(EltTys[0]->getContext(), EltTys); +} Why are you manually inserting padding? IR level accesses don't require explicit layout, and we

[PATCH] D130969: [clang] [HLSL] Fix GCC warnings about virtual methods that are hidden

2022-08-10 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 is a really unfortunate interface that causes this :(. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D130969/new/ https://reviews.llvm.o

[PATCH] D131625: [HLSL] Entry functions require param annotation

2022-08-10 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: bogner, aaron.ballman, python3kgae, pow2clk, tex3d. Herald added a subscriber: Anastasia. Herald added a project: All. beanz requested review of this revision. Herald added a project: clang. HLSL entry function parameters must have parameter anno

[PATCH] D131203: [HLSL] Initial codegen for SV_GroupIndex

2022-08-10 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 451660. beanz added a comment. This is a fairly significant reworking of this patch to handle entry functions being called (which I hadn't anticipated). There may be some additional tweaks required, but the general flow here is: (1) Don't prevent mangling of

[PATCH] D131625: [HLSL] Entry functions require param annotation

2022-08-10 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/lib/Sema/SemaDecl.cpp:11875 + for (const auto Param : FD->parameters()) { +if (!Param->hasAttr()) { + Diag(Param->getLocation(), diag::err_hlsl_missing_parameter_annotation) << Param; python3kgae wrote: >

[PATCH] D131203: [HLSL] Initial codegen for SV_GroupIndex

2022-08-10 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/lib/CodeGen/CGHLSLRuntime.cpp:19 #include "clang/Basic/TargetOptions.h" +#include "llvm/IR/IntrinsicsDirectX.h" #include "llvm/IR/Metadata.h" python3kgae wrote: > Does this mean CGHLSLRuntime is only for DirectX ba

[PATCH] D106732: Support macro deprecation #pragma clang deprecated

2021-07-23 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: aaron.ballman, rsmith, erik.pilkington, lgerbarg, pete. Herald added a subscriber: dexonsmith. beanz requested review of this revision. Herald added a reviewer: jdoerfert. Herald added a subscriber: sstefan1. Herald added a project: clang. This p

[PATCH] D106732: Support macro deprecation #pragma clang deprecated

2021-07-24 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 361480. beanz added a comment. Updating comment about remaining bits. Rather than subtracting one, I re-added up the bits. The bitfield is now at 40 bits, so it only has 24 bits remaining (someone please check my math). Repository: rG LLVM Github Monorepo

[PATCH] D106732: Support macro deprecation #pragma clang deprecated

2021-07-26 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. Will update the patch later today with your feedback. Comment at: clang/docs/LanguageExtensions.rst:3875 + #define MIN(x, y) x < y ? x : y + #pragma clang deprecated("MIN", "use std::min instead") + aaron.ballman wrote: > Rather than

[PATCH] D106732: Support macro deprecation #pragma clang deprecated

2021-07-26 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 361761. beanz added a comment. Updates based on feedback from @aaron.ballman Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106732/new/ https://reviews.llvm.org/D106732 Files: clang/docs/LanguageExtensions.rst

[PATCH] D106732: Support macro deprecation #pragma clang deprecated

2021-07-26 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 361831. beanz added a comment. Fixing handling of #ifdef, #ifndef, and defined() All tests pass this time :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106732/new/ https://reviews.llvm.org/D106732 Files: c

[PATCH] D106732: Support macro deprecation #pragma clang deprecated

2021-07-27 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 362028. beanz marked 13 inline comments as done. beanz added a comment. Minor comment fix Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106732/new/ https://reviews.llvm.org/D106732 Files: clang/docs/LanguageEx

[PATCH] D106732: Support macro deprecation #pragma clang deprecated

2021-07-27 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. All feedback should be addressed Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106732/new/ https://reviews.llvm.org/D106732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D106732: Support macro deprecation #pragma clang deprecated

2021-07-27 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 362049. beanz added a comment. Fix warning printing always having a `:` on the end. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106732/new/ https://reviews.llvm.org/D106732 Files: clang/docs/LanguageExtensio

[PATCH] D106732: Support macro deprecation #pragma clang deprecated

2021-07-27 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 362052. beanz added a comment. Minor comment fixes... I swear, eventually I'll be done... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106732/new/ https://reviews.llvm.org/D106732 Files: clang/docs/LanguageEx

[PATCH] D106732: Support macro deprecation #pragma clang deprecated

2021-07-27 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 362053. beanz added a comment. Missed one Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106732/new/ https://reviews.llvm.org/D106732 Files: clang/docs/LanguageExtensions.rst clang/include/clang/Basic/Diagnos

[PATCH] D106732: Support macro deprecation #pragma clang deprecated

2021-07-27 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 362123. beanz added a comment. One last fix for a test failure my change caused. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106732/new/ https://reviews.llvm.org/D106732 Files: clang/docs/LanguageExtensions.

[PATCH] D106732: Support macro deprecation #pragma clang deprecated

2021-07-28 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 362528. beanz added a comment. Covered taken #elif* directives per @aaron.ballmon's feedback. Handling non-taken #elif directives is non-trivial because clang skips parsing the conditionals for non-taken directives. At present clang won't even error on malfor

[PATCH] D106732: Support macro deprecation #pragma clang deprecated

2021-07-28 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 362574. beanz added a comment. Moving the warning emission later. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106732/new/ https://reviews.llvm.org/D106732 Files: clang/docs/LanguageExtensions.rst clang/inc

[PATCH] D106732: Support macro deprecation #pragma clang deprecated

2021-07-29 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 362764. beanz marked 3 inline comments as done. beanz added a comment. Addressing @aaron.ballman's feedback. I've added FIXMEs and test cases with not-expected annotations so that in the future if the underlying issue gets fixed, the tests should only need upd

[PATCH] D106732: Support macro deprecation #pragma clang deprecated

2021-07-29 Thread Chris Bieneman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG26c695b78930: Support macro deprecation #pragma clang deprecated (authored by beanz). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106732/new/ https://revi

[PATCH] D107095: This patch adds `#pragma clang header_unsafe` to enable flagging macros as unsafe for header use. This is to allow macros that may have ABI implications to be avoided in headers that

2021-07-29 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: aaron.ballman, rsmith, lgerbarg, pete. Herald added a subscriber: dexonsmith. beanz requested review of this revision. Herald added a project: clang. Using macros in headers (particularly public headers) can cause a variety of issues relating to

[PATCH] D107095: This patch adds `#pragma clang header_unsafe` to enable flagging macros as unsafe for header use. This is to allow macros that may have ABI implications to be avoided in headers that

2021-07-29 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 362840. beanz added a comment. Fixing an inadvertant change. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107095/new/ https://reviews.llvm.org/D107095 Files: clang/docs/LanguageExtensions.rst clang/include/

[PATCH] D107095: Implement #pragma clang header_unsafe

2021-07-29 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 362856. beanz added a comment. Re-adding a newline that was inadvertently remvoed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107095/new/ https://reviews.llvm.org/D107095 Files: clang/docs/LanguageExtension

[PATCH] D122085: Add clang DirectX target support

2022-03-19 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: MaskRay, tstellar, pete, jdoerfert, sheredom, kuhar, antiagainst, nhaehnle, rnk. Herald added a subscriber: mgorny. Herald added a project: All. beanz requested review of this revision. Herald added a project: clang. This change adds a stub Dire

[PATCH] D122087: Add HLSL Language Option and Preprocessor

2022-03-19 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: MaskRay, tstellar, pete, jdoerfert, sheredom, kuhar, antiagainst, nhaehnle, rnk. Herald added a subscriber: dexonsmith. Herald added a project: All. beanz requested review of this revision. Herald added a project: clang. Bringing in HLSL as a la

[PATCH] D123167: [HLSL] Pointers are unsupported in HLSL

2022-04-06 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. In D123167#3434023 , @aaron.ballman wrote: > I think you're going to need semantic restrictions as well as parsing > restrictions because of type deduction. Even if you don't support templates > (yet), there's still `auto`, `decl

[PATCH] D123167: [HLSL] Pointers are unsupported in HLSL

2022-04-06 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. In D123167#3434346 , @tschuett wrote: > Do you need a SemaHLSL.cpp file similar to SemaSYCL.cpp? Yes absolutely. I haven't yet added any Sema-specific validations yet that are complex enough to break out, but we will 100% get ther

[PATCH] D123167: [HLSL] Pointers are unsupported in HLSL

2022-04-06 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. In D123167#3434350 , @tschuett wrote: > Is the downstream compiler also relying on the parser? Not sure what you mean by downstream compiler. The current official HLSL compiler is a fork of clang-3.7. We don't intend to merge code

[PATCH] D123167: [HLSL] Pointers are unsupported in HLSL

2022-04-06 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. In D123167#3434364 , @tschuett wrote: > Relying on the parser to find semantic misbehavior sounds strange ... I don't disagree. An alternative point: HLSL has no _syntax_ for pointers. Repository: rG LLVM Github Monorepo CHANG

[PATCH] D123167: [HLSL] Pointers are unsupported in HLSL

2022-04-06 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. In D123167#3434375 , @aaron.ballman wrote: > I had a meeting with @beanz today because I was also pretty surprised. Chris, > it might make sense to type up a bit of what we talked about as an FAQ and > maybe stick it in Clang's d

[PATCH] D123278: [Clang] [Docs] Add HLSLSupport page

2022-04-06 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: tschuett, aaron.ballman, jaebaek, antiagainst, kuhar. Herald added a subscriber: arphaman. Herald added a project: All. beanz requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This document

[PATCH] D123278: [Clang] [Docs] Add HLSLSupport page

2022-04-07 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. I'll do an edit pass tonight and update. I've also gone through and replied to some of the questions and comments inline. Thank you! Comment at: clang/docs/HLSLSupport.rst:22-23 +`_. in all its suppor

[PATCH] D123278: [Clang] [Docs] Add HLSLSupport page

2022-04-07 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 421373. beanz added a comment. Updating with edits based on review feedback. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123278/new/ https://reviews.llvm.org/D123278 Files: clang/docs/HLSLSupport.rst clang

[PATCH] D123278: [Clang] [Docs] Add HLSLSupport page

2022-04-08 Thread Chris Bieneman via Phabricator via cfe-commits
beanz marked 30 inline comments as done. beanz added inline comments. Comment at: clang/docs/HLSLSupport.rst:150-152 +HLSL has a ``precise`` qualifier that behaves unlike anything else in the C +language. The support for this qualifier in DXC is buggy, so our bar for +compatibili

[PATCH] D123278: [Clang] [Docs] Add HLSLSupport page

2022-04-08 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 421524. beanz added a comment. Updating based on feedback :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123278/new/ https://reviews.llvm.org/D123278 Files: clang/docs/HLSLSupport.rst clang/docs/index.rst

[PATCH] D123278: [Clang] [Docs] Add HLSLSupport page

2022-04-08 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/docs/HLSLSupport.rst:150-152 +HLSL has a ``precise`` qualifier that behaves unlike anything else in the C +language. The support for this qualifier in DXC is buggy, so our bar for +compatibility is low. aaron.ballman

[PATCH] D123278: [Clang] [Docs] Add HLSLSupport page

2022-04-08 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 rG9e3678e16155: [Clang] [Docs] Add HLSLSupport page (authored by beanz). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://re

[PATCH] D122865: [HLSL][clang][Driver] Support target profile command line option.

2022-04-12 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/lib/Driver/Driver.cpp:1196 + + if (IsDXCMode()) { +// clang-dxc target is build from target_profile option. nit: this can be an `else` for the `if` above Comment at: clang/lib/Driver/ToolChain

[PATCH] D122865: [HLSL][clang][Driver] Support target profile command line option.

2022-04-13 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/D122865/new/ https://reviews.llvm.org/D122865 ___ c

[PATCH] D123167: [HLSL] Pointers are unsupported in HLSL

2022-04-13 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 422738. beanz added a comment. Updating based on PR feedback. I've moved the error reporting into Sema, and added additional errors for unsupported operators. I've also expanded the test coverage with some of @aaron.ballman's cursed code, which improves cove

[PATCH] D123167: [HLSL] Pointers are unsupported in HLSL

2022-04-14 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. One comment inline. Update coming in a few minutes. Comment at: clang/lib/Sema/SemaExpr.cpp:15252-15257 + if (getLangOpts().HLSL) { +if (Opc == UO_AddrOf) + return ExprError(Diag(OpLoc, diag::err_hlsl_operator_unsupported) << 0); +if (Opc ==

[PATCH] D123167: [HLSL] Pointers are unsupported in HLSL

2022-04-14 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 422860. beanz added a comment. Updates to test cases to increase coverage. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123167/new/ https://reviews.llvm.org/D123167 Files: clang/include/clang/Basic/Diagnostic

[PATCH] D122699: [HLSL] Add Semantic syntax, and SV_GroupIndex

2022-04-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 rG1fdf952deeb9: [HLSL] Add Semantic syntax, and SV_GroupIndex (authored by beanz). Changed prior to commit: https://reviews.llvm.org/D122699?vs=4206

[PATCH] D123167: [HLSL] Pointers are unsupported in HLSL

2022-04-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 rG3efad612d234: [HLSL] Pointers are unsupported in HLSL (authored by beanz). Changed prior to commit: https://reviews.llvm.org/D123167?vs=422860&id=

[PATCH] D122865: [HLSL][clang][Driver] Support target profile command line option.

2022-04-15 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 rG721651be246e: [HLSL][clang][Driver] Support target profile command line option. (authored by python3kgae, committed by beanz). Changed prior to comm

[PATCH] D122865: [HLSL][clang][Driver] Support target profile command line option.

2022-04-15 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. @wolfgangp I can't reproduce the failure locally, but I have a guess what's going wrong. I _think_ the issue is that the SmallStrings aren't null terminated and the cleared allocations aren't zero'd. I pushed a speculative fix in rG329abac134a3

[PATCH] D123887: [HLSL][clang][Driver] Fix test error for use SmallString::data instead SmallString::c_str.

2022-04-15 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. I already merged a fix to resolve the test errors. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123887/new/ https://reviews.llvm.org/D123887 ___ cfe-commits mailing list cfe-commi

[PATCH] D119362: [NFC] Make file offsets a regex to handle CRLF

2022-02-09 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: aaron.ballman, jyknight, rnk, dblaikie. beanz requested review of this revision. Herald added a project: clang. None of these tests are really intended to test the file offset as much as to test the structure. Making the regex allows this test to

[PATCH] D119362: [NFC] Make file offsets a regex to handle CRLF

2022-02-09 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. I realize this is a _big_ silly NFC change, but I figured I'd blast it out there in case anyone objects to the premise. My goal is to eventually get to the point where Windows developers can use autocrlf (see the note here: https://llvm.org/docs/GettingStarted.html#check

[PATCH] D119362: [NFC] Make file offsets a regex to handle CRLF

2022-02-10 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 rG6d8e5c968538: [NFC] Make file offsets a regex to handle CRLF (authored by beanz). Changed prior to commit: https://reviews.llvm.org/D119362?vs=407

[PATCH] D124339: [NFC][Clang][Pragma] Remove unused variables

2022-04-23 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/D124339/new/ https://reviews.llvm.org/D124339 ___ c

[PATCH] D123884: [HLSL][clang][Driver] Support target profile command line option.

2022-04-26 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/include/clang/Basic/CodeGenOptions.h:194 + /// The validator version for dxil. + std::string DxilValidatorVersion; + Rather than adding this to `CodeGenOptions`, it may make sense to put this in `TargetOptions` in

[PATCH] D124474: Honor COMPILER_RT_INCLUDE_TESTS when using LLVM_BUILD_EXTERNAL_COMPILER_RT=ON

2022-04-26 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. I question whether we should be extending this or killing it off... Is there a reason you're using `LLVM_BUILD_EXTERNAL_COMPILER_RT` instead of `LLVM_ENABLE_RUNTIMES=compiler-rt`? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org

[PATCH] D124474: Honor COMPILER_RT_INCLUDE_TESTS when using LLVM_BUILD_EXTERNAL_COMPILER_RT=ON

2022-04-26 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. In D124474#3475539 , @azharudd wrote: > In this case I'm just trying to make it work with existing build > configurations where it is being used (for example Swift). We should > definitely be moving away from `LLVM_BUILD_EXTERNAL_

[PATCH] D124474: Honor COMPILER_RT_INCLUDE_TESTS when using LLVM_BUILD_EXTERNAL_COMPILER_RT=ON

2022-04-26 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added reviewers: compnerd, ldionne, smeenai. beanz added subscribers: smeenai, ldionne, compnerd. beanz added a comment. I don't want to roadblock or say "no we absolutely can't let this in", _but_... Apple Clang and Swift have long been the only reason we've kept this code alive. I didn't

[PATCH] D123884: [HLSL][clang][Driver] Support target profile command line option.

2022-04-26 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. I pointed out a few (not all) the places where you have unneeded brackets. Also all your new files don't have newlines at the end of them (the C standard specifies that as a requirement although pretty much all compilers just issue a warning). Comment

[PATCH] D124487: [HLSL] Adjust access specifier behavior

2022-04-26 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: aaron.ballman, MaskRay, kuhar, rsmith. Herald added subscribers: Anastasia, StephenFan. Herald added a project: All. beanz requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. HLSL doesn't supp

[PATCH] D124474: Honor COMPILER_RT_INCLUDE_TESTS when using LLVM_BUILD_EXTERNAL_COMPILER_RT=ON

2022-04-26 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. Posted an RFC: https://discourse.llvm.org/t/rfc-deprecate-and-remove-llvm-build-external-compiler-rt/62058 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124474/new/ https://reviews.llvm.org/D124474 _

[PATCH] D124489: Deprecate LLVM_BUILD_EXTERNAL_COMPILER_RT

2022-04-26 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: delcypher, phosek, compnerd, ldionne, smeenai. Herald added a subscriber: mgorny. Herald added a project: All. beanz requested review of this revision. Herald added a project: clang. This patch goes with the RFC posted here: https://discourse.llv

[PATCH] D124489: Deprecate LLVM_BUILD_EXTERNAL_COMPILER_RT

2022-04-26 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 425353. beanz added a comment. Making the warning message more specific. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124489/new/ https://reviews.llvm.org/D124489 Files: clang/runtime/CMakeLists.txt Index:

[PATCH] D124489: Deprecate LLVM_BUILD_EXTERNAL_COMPILER_RT

2022-04-26 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. Making it an `ERROR` and providing an option to downgrade it to a `WARNING` seems reasonable to me. Thoughts? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124489/new/ https://reviews.llvm.org/D124489 __

[PATCH] D124474: Honor COMPILER_RT_INCLUDE_TESTS when using LLVM_BUILD_EXTERNAL_COMPILER_RT=ON

2022-04-27 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a comment. I posted a PR to swift that migrates build-script to use `LLVM_ENABLE_RUNTIMES`: https://github.com/apple/swift/pull/58465 Obviously I can't test this against your internal infrastructure, but the change here is pretty trivial. Repository: rG LLVM Github Monorepo CHA

[PATCH] D124487: [HLSL] Adjust access specifier behavior

2022-04-27 Thread Chris Bieneman via Phabricator via cfe-commits
beanz updated this revision to Diff 425678. beanz added a comment. Herald added a project: clang-tools-extra. Updates based on PR feedback. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D124487/new/ https://reviews.llvm.org/D124487 Files: clang-t

[PATCH] D124487: [HLSL] Adjust access specifier behavior

2022-04-28 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang-tools-extra/test/clang-apply-replacements/Inputs/crlf/crlf.cpp:1 - -// This file intentionally uses a CRLF newlines! - -void foo() { - int *x = 0; -} + +// This file intentionally uses a CRLF newlines! aaron.ballma

[PATCH] D124487: [HLSL] Adjust access specifier behavior

2022-04-28 Thread Chris Bieneman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0d6b574b8717: [HLSL] Adjust access specifier behavior (authored by beanz). Changed prior to commit: https://reviews.llvm.org/D124487?vs=425678&id=425799#toc Repository: rG LLVM Github Monorepo CHANG

[PATCH] D123884: [HLSL][clang][Driver] Support validator version command line option.

2022-04-29 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/D123884/new/ https://reviews.llvm.org/D123884 ___

[PATCH] D124790: [HLSL] Enable half type for hlsl.

2022-05-04 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/lib/Basic/LangOptions.cpp:197 - // OpenCL has half keyword - Opts.Half = Opts.OpenCL; + // OpenCL and HLSL have half keyword + Opts.Half = Opts.OpenCL || Opts.HLSL; aaron.ballman wrote: > python3kgae wrote: > >

[PATCH] D124983: [HLSL} add -fcgl option flag.

2022-05-05 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments. Comment at: clang/include/clang/Driver/Options.td:6765 "as_6_5, as_6_6, as_6_7">; +def fcgl : DXCFlag<"fcgl">, + HelpText<"Generate high-level code only. Without any dxil related passes.">; aaron.ballman wrote: > Any partic

<    2   3   4   5   6   7   8   9   10   >