Re: [PATCH] D34563: [ubsan] Disable the object-size check at -O0

2017-06-23 Thread Justin Bogner via cfe-commits
Vedant Kumar via Phabricator writes: > vsk created this revision. > > This is motivated by the thread: > [cfe-dev] Disabling ubsan's object size check at -O0 > > I think the driver is the best place to disable a sanitizer check at > particular optimization levels. Doing so in the frontend is messy

Re: [PATCH] D34563: [ubsan] Disable the object-size check at -O0

2017-06-23 Thread Justin Bogner via cfe-commits
v...@apple.com writes: > Good point, it makes sense to hand users a warning when they explicitly enable > -fsanitize=object-size at -O0. I've added in the diagnostic. PTAL. LGTM. > diff --git a/include/clang/Basic/DiagnosticDriverKinds.td > b/include/clang/Basic/DiagnosticDriverKinds.td > index

r284341 - AST: Improve a couple of comments and cast unused values to void

2016-10-16 Thread Justin Bogner via cfe-commits
Author: bogner Date: Sun Oct 16 15:12:42 2016 New Revision: 284341 URL: http://llvm.org/viewvc/llvm-project?rev=284341&view=rev Log: AST: Improve a couple of comments and cast unused values to void Make these comments a bit more explicit that they're initializing the RawText member, and explicitl

r284366 - AST: Prefer LLVM_NODISCARD to LLVM_ATTRIBUTE_UNUSED_RESULT

2016-10-16 Thread Justin Bogner via cfe-commits
Author: bogner Date: Mon Oct 17 01:46:35 2016 New Revision: 284366 URL: http://llvm.org/viewvc/llvm-project?rev=284366&view=rev Log: AST: Prefer LLVM_NODISCARD to LLVM_ATTRIBUTE_UNUSED_RESULT Modified: cfe/trunk/lib/AST/ExprConstant.cpp Modified: cfe/trunk/lib/AST/ExprConstant.cpp URL: http

[clang] [Clang][Sema] Don't say "is declared here" for invalid template locations (PR #71264)

2023-11-09 Thread Justin Bogner via cfe-commits
bogner wrote: ping. @AaronBallman Does this look like a reasonable thing to do to you? https://github.com/llvm/llvm-project/pull/71264 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[openmp] [libcxxabi] [clang] [compiler-rt] [libc] [mlir] [flang] [libcxx] [llvm] [lldb] [lld] [clang-tools-extra] [libunwind] [Clang][Sema] Don't say "is declared here" for invalid template locations

2023-12-06 Thread Justin Bogner via cfe-commits
https://github.com/bogner updated https://github.com/llvm/llvm-project/pull/71264 >From cab6bcd73081fcbe9807adbf60b345f8d9e654e4 Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Fri, 3 Nov 2023 18:59:49 -0700 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?= =?UTF-

[compiler-rt] [llvm] [openmp] [libc] [lldb] [libcxx] [libcxxabi] [libunwind] [lld] [clang-tools-extra] [clang] [flang] [mlir] [Clang][Sema] Don't say "is declared here" for invalid template locations

2023-12-06 Thread Justin Bogner via cfe-commits
https://github.com/bogner closed https://github.com/llvm/llvm-project/pull/71264 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [clang] [mlir] [llvm] [lld] [clang-tools-extra] [openmp] [HLSL] RWBuffer should not have a default parameter (PR #71265)

2023-12-06 Thread Justin Bogner via cfe-commits
https://github.com/bogner edited https://github.com/llvm/llvm-project/pull/71265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[mlir] [flang] [clang] [lld] [openmp] [llvm] [clang-tools-extra] [HLSL] RWBuffer should not have a default parameter (PR #71265)

2023-12-06 Thread Justin Bogner via cfe-commits
https://github.com/bogner updated https://github.com/llvm/llvm-project/pull/71265 >From 1779fd08dad4f03ae5e9f1803b8ea3d7dc77c093 Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Fri, 3 Nov 2023 19:03:00 -0700 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20change?= =?UTF-

[openmp] [lld] [clang-tools-extra] [llvm] [flang] [clang] [mlir] [HLSL] RWBuffer should not have a default parameter (PR #71265)

2023-12-06 Thread Justin Bogner via cfe-commits
https://github.com/bogner closed https://github.com/llvm/llvm-project/pull/71265 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c502a81 - [HLSL] Add helpers to simplify HLSL resource type declarations. NFC

2023-12-07 Thread Justin Bogner via cfe-commits
Author: Justin Bogner Date: 2023-12-07T17:31:35-08:00 New Revision: c502a81b439b68cb029e16ca9d444d897b5e7727 URL: https://github.com/llvm/llvm-project/commit/c502a81b439b68cb029e16ca9d444d897b5e7727 DIFF: https://github.com/llvm/llvm-project/commit/c502a81b439b68cb029e16ca9d444d897b5e7727.diff

[llvm] [clang] [DirectX] Move ROV info into HLSL metadata. NFC (PR #74896)

2023-12-08 Thread Justin Bogner via cfe-commits
https://github.com/bogner created https://github.com/llvm/llvm-project/pull/74896 None >From 133bdc09eed41545794a369d3fa4d2afb720815e Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Fri, 8 Dec 2023 15:41:14 -0800 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=

[llvm] [clang] [DirectX] Move ROV info into HLSL metadata. NFC (PR #74896)

2023-12-08 Thread Justin Bogner via cfe-commits
@@ -219,7 +221,7 @@ void CGHLSLRuntime::addBufferResourceAnnotation(llvm::GlobalVariable *GV, "ResourceMD must have been set by the switch above."); llvm::hlsl::FrontendResource Res( - GV, TyName, RK, Binding.Reg.value_or(UINT_MAX), Binding.Space); + GV,

[clang] [llvm] [DirectX] Move ROV info into HLSL metadata. NFC (PR #74896)

2023-12-09 Thread Justin Bogner via cfe-commits
https://github.com/bogner updated https://github.com/llvm/llvm-project/pull/74896 >From 133bdc09eed41545794a369d3fa4d2afb720815e Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Fri, 8 Dec 2023 15:41:14 -0800 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UTF-

[llvm] [clang] [DirectX] Move ROV info into HLSL metadata. NFC (PR #74896)

2023-12-09 Thread Justin Bogner via cfe-commits
https://github.com/bogner closed https://github.com/llvm/llvm-project/pull/74896 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [mlir] [libcxx] [compiler-rt] [clang] [llvm] [HLSL] Define RasterizerOrderedBuffer resource (PR #74897)

2023-12-09 Thread Justin Bogner via cfe-commits
https://github.com/bogner edited https://github.com/llvm/llvm-project/pull/74897 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[mlir] [compiler-rt] [llvm] [clang-tools-extra] [libcxx] [clang] [HLSL] Define RasterizerOrderedBuffer resource (PR #74897)

2023-12-09 Thread Justin Bogner via cfe-commits
https://github.com/bogner closed https://github.com/llvm/llvm-project/pull/74897 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Parameter modifier parsing and AST (PR #72139)

2023-11-14 Thread Justin Bogner via cfe-commits
@@ -5559,7 +5562,6 @@ bool Parser::isTypeSpecifierQualifier() { case tok::kw___read_write: case tok::kw___write_only: case tok::kw___funcref: - case tok::kw_groupshared: return true; bogner wrote: This is technically an unrelated bugfix. Not sure i

[clang] [HLSL] Parameter modifier parsing and AST (PR #72139)

2023-11-14 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,64 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.6-library %s -verify +void fn(in out float f); // #fn + +// expected-error@#fn2{{duplicate parameter modifier 'in'}} +// expected-note@#fn2{{conflicting attribute is here}} +void fn2(in in float f); // #fn2 + +// ex

[clang] [HLSL] Parameter modifier parsing and AST (PR #72139)

2023-11-14 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/72139 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Parameter modifier parsing and AST (PR #72139)

2023-11-14 Thread Justin Bogner via cfe-commits
https://github.com/bogner edited https://github.com/llvm/llvm-project/pull/72139 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Don't say "is declared here" for invalid template locations (PR #71264)

2023-11-17 Thread Justin Bogner via cfe-commits
bogner wrote: ping. https://github.com/llvm/llvm-project/pull/71264 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)

2023-10-31 Thread Justin Bogner via cfe-commits
bogner wrote: This is NFC in practice so it might be okay that I don't have any tests, but if folks have ideas on how to test this I'd like that better. https://github.com/llvm/llvm-project/pull/70835 ___ cfe-commits mailing list cfe-commits@lists.llv

[clang] [clang-tools-extra] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)

2023-10-31 Thread Justin Bogner via cfe-commits
@@ -930,77 +936,83 @@ namespace { OS << getLowerName() << "(" << getUpperName() << ")"; } void writeCtorDefaultInitializers(raw_ostream &OS) const override { - OS << getLowerName() << "(" << type << "(0))"; + OS << getLowerName() << "(" << fullType << "(

[clang] [clang-tools-extra] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)

2023-10-31 Thread Justin Bogner via cfe-commits
@@ -19,11 +19,12 @@ #include "clang/AST/Type.h" #include "clang/Basic/AttrKinds.h" #include "clang/Basic/AttributeCommonInfo.h" -#include "clang/Basic/LangOptions.h" #include "clang/Basic/LLVM.h" +#include "clang/Basic/LangOptions.h" #include "clang/Basic/OpenMPKinds.h" #inc

[clang] [clang-tools-extra] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)

2023-10-31 Thread Justin Bogner via cfe-commits
@@ -1010,14 +1022,17 @@ namespace { // trivial because some enumeration values have multiple named // enumerators, such as type_visibility(internal) and // type_visibility(hidden) both mapping to TypeVisibilityAttr::Hidden. - OS << "const char *" << getAt

[clang] [clang-tools-extra] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)

2023-10-31 Thread Justin Bogner via cfe-commits
@@ -279,12 +279,13 @@ class DefaultIntArgument : IntArgument { // This argument is more complex, it includes the enumerator type name, // a list of strings to accept, and a list of enumerators to map them to. -class EnumArgument values, +class EnumArgument values, ---

[clang] [clang-tools-extra] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)

2023-10-31 Thread Justin Bogner via cfe-commits
@@ -898,23 +898,29 @@ namespace { } class EnumArgument : public Argument { -std::string type; +std::string fullType; +StringRef shortType; std::vector values, enums, uniques; +bool isExternal; public: EnumArgument(const Record &Arg, StringRef

[clang] [clang-tools-extra] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)

2023-10-31 Thread Justin Bogner via cfe-commits
@@ -1010,14 +1022,17 @@ namespace { // trivial because some enumeration values have multiple named // enumerators, such as type_visibility(internal) and // type_visibility(hidden) both mapping to TypeVisibilityAttr::Hidden. - OS << "const char *" << getAt

[clang] [clang-tools-extra] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)

2023-10-31 Thread Justin Bogner via cfe-commits
@@ -930,77 +936,83 @@ namespace { OS << getLowerName() << "(" << getUpperName() << ")"; } void writeCtorDefaultInitializers(raw_ostream &OS) const override { - OS << getLowerName() << "(" << type << "(0))"; + OS << getLowerName() << "(" << fullType << "(

[clang] [clang-tools-extra] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)

2023-10-31 Thread Justin Bogner via cfe-commits
@@ -279,12 +279,13 @@ class DefaultIntArgument : IntArgument { // This argument is more complex, it includes the enumerator type name, // a list of strings to accept, and a list of enumerators to map them to. -class EnumArgument values, +class EnumArgument values, ---

[clang-tools-extra] [clang] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)

2023-10-31 Thread Justin Bogner via cfe-commits
@@ -898,23 +898,29 @@ namespace { } class EnumArgument : public Argument { -std::string type; +std::string fullType; +StringRef shortType; std::vector values, enums, uniques; +bool isExternal; public: EnumArgument(const Record &Arg, StringRef

[clang-tools-extra] [clang] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)

2023-10-31 Thread Justin Bogner via cfe-commits
@@ -898,23 +898,29 @@ namespace { } class EnumArgument : public Argument { -std::string type; +std::string fullType; +StringRef shortType; std::vector values, enums, uniques; +bool isExternal; public: EnumArgument(const Record &Arg, StringRef

[clang] [clang-tools-extra] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)

2023-10-31 Thread Justin Bogner via cfe-commits
bogner wrote: > Its a bit of a shame that the `VariadicEnumArgument` isn't being included > here/updated here, I typically appreciate the variadic versions being kept in > sync. But since we don't have a use for it at the moment, I think a 'fixme' > (or a future patch!) would be acceptable. I

[clang] [clang-tools-extra] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)

2023-10-31 Thread Justin Bogner via cfe-commits
@@ -898,23 +898,29 @@ namespace { } class EnumArgument : public Argument { -std::string type; +std::string fullType; +StringRef shortType; std::vector values, enums, uniques; +bool isExternal; public: EnumArgument(const Record &Arg, StringRef

[clang] [clang-tools-extra] [Attributes][HLSL] Teach EnumArgument to refer to an external enum (PR #70835)

2023-11-01 Thread Justin Bogner via cfe-commits
https://github.com/bogner closed https://github.com/llvm/llvm-project/pull/70835 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][Docs] Add documentation for HLSL functions (PR #75397)

2023-12-14 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,300 @@ +=== +HLSL Function Calls +=== + +.. contents:: + :local: + +Introduction + + +This document descries the design and implementation of HLSL's function call +semantics in Clang. This includes details related to argumen

[clang] [HLSL][Docs] Add documentation for HLSL functions (PR #75397)

2023-12-14 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,319 @@ +=== +HLSL Function Calls +=== + +.. contents:: + :local: + +Introduction + + +This document describes the design and implementation of HLSL's function call +semantics in Clang. This includes details related to argume

[clang] [HLSL][Docs] Add documentation for HLSL functions (PR #75397)

2023-12-14 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,319 @@ +=== +HLSL Function Calls +=== + +.. contents:: + :local: + +Introduction + + +This document describes the design and implementation of HLSL's function call +semantics in Clang. This includes details related to argume

[clang] [HLSL][Docs] Add documentation for HLSL functions (PR #75397)

2023-12-14 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,316 @@ +=== +HLSL Function Calls +=== + +.. contents:: + :local: + +Introduction + + +This document describes the design and implementation of HLSL's function call +semantics in Clang. This includes details related to argume

[llvm] [clang] [HLSL][DirectX] Move handling of resource element types into the frontend (PR #75674)

2023-12-15 Thread Justin Bogner via cfe-commits
https://github.com/bogner created https://github.com/llvm/llvm-project/pull/75674 Rather than shepherding a type name all the way to the backend as a string and attempting to parse it, get the element type out of the AST and store that in the resource annotation metadata directly. >From 9d6e00

[clang] [llvm] [HLSL][DirectX] Move handling of resource element types into the frontend (PR #75674)

2023-12-18 Thread Justin Bogner via cfe-commits
@@ -253,35 +246,6 @@ void UAVResource::print(raw_ostream &OS) const { ResourceBase::print(OS, "U", "u"); } -// FIXME: Capture this in HLSL source. I would go do this right now, but I want -// to get this in first so that I can make sure to capture all the extra -// informati

[clang] [llvm] [HLSL][DirectX] Move handling of resource element types into the frontend (PR #75674)

2023-12-18 Thread Justin Bogner via cfe-commits
@@ -216,15 +214,62 @@ void CGHLSLRuntime::addBufferResourceAnnotation(llvm::GlobalVariable *GV, assert(false && "Unsupported buffer type!"); return; } - assert(ResourceMD != nullptr && "ResourceMD must have been set by the switch above."); llvm::hls

[libcxx] [flang] [llvm] [lldb] [libcxxabi] [clang] [clang-tools-extra] [lld] [compiler-rt] [libc] [HLSL][DirectX] Move handling of resource element types into the frontend (PR #75674)

2023-12-18 Thread Justin Bogner via cfe-commits
https://github.com/bogner updated https://github.com/llvm/llvm-project/pull/75674 >From 9d6e00bd972a563daefd67b544614e2bb609cc42 Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Fri, 15 Dec 2023 16:29:09 -0800 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?= =?UTF

[compiler-rt] [clang-tools-extra] [libcxx] [lldb] [clang] [libc] [llvm] [libcxxabi] [lld] [flang] [HLSL][DirectX] Move handling of resource element types into the frontend (PR #75674)

2023-12-18 Thread Justin Bogner via cfe-commits
https://github.com/bogner closed https://github.com/llvm/llvm-project/pull/75674 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][Docs] Add documentation for HLSL functions (PR #75397)

2023-12-19 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/75397 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [libc] [flang] [clang] [compiler-rt] [libcxx] [llvm] [IR] Disallow ZeroInit for spirv.Image (PR #73887)

2023-12-19 Thread Justin Bogner via cfe-commits
bogner wrote: This change causes a number of the spir-v backend tests to crash: > Failed Tests (5): > LLVM :: CodeGen/SPIRV/image-unoptimized.ll > LLVM :: CodeGen/SPIRV/read_image.ll > LLVM :: CodeGen/SPIRV/transcoding/get_image_num_mip_levels.ll > LLVM :: CodeGen/SPIRV/transcoding/image_

[llvm] [clang] [clang-tools-extra] [Clang][Sema] Don't say "is declared here" for invalid template locations (PR #71264)

2023-11-29 Thread Justin Bogner via cfe-commits
https://github.com/bogner updated https://github.com/llvm/llvm-project/pull/71264 >From cab6bcd73081fcbe9807adbf60b345f8d9e654e4 Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Fri, 3 Nov 2023 18:59:49 -0700 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?= =?UTF-

[clang] [llvm] [clang-tools-extra] [Clang][Sema] Don't say "is declared here" for invalid template locations (PR #71264)

2023-11-29 Thread Justin Bogner via cfe-commits
bogner wrote: > That's a lot of repeated code. Should we have a "NoteTemplateLocation" > function(s) of some sort that would do the check and the diag as appropriate? Makes sense to me, and also makes @AaronBallman's idea of emitting notes referring to the external source a little easier. Done

[clang-tools-extra] [llvm] [clang] [Clang][Sema] Don't say "is declared here" for invalid template locations (PR #71264)

2023-11-29 Thread Justin Bogner via cfe-commits
bogner wrote: > I agree that "is declared here" is useless when "here" is... nowhere. But the > point to the note is to help the user to see what the actual declaration is > to help them repair the issue. Losing the note entirely isn't the worst > thing, but I wonder if it would be better for

[flang] [libcxx] [libcxxabi] [lldb] [llvm] [libunwind] [clang-tools-extra] [openmp] [clang] [lld] [Clang][Sema] Don't say "is declared here" for invalid template locations (PR #71264)

2023-11-30 Thread Justin Bogner via cfe-commits
https://github.com/bogner updated https://github.com/llvm/llvm-project/pull/71264 >From cab6bcd73081fcbe9807adbf60b345f8d9e654e4 Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Fri, 3 Nov 2023 18:59:49 -0700 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?= =?UTF-

[clang-tools-extra] [lld] [clang] [openmp] [mlir] [lldb] [llvm] [flang] [libunwind] [libcxx] [libc] [libcxxabi] [Clang][Sema] Don't say "is declared here" for invalid template locations (PR #71264)

2023-11-30 Thread Justin Bogner via cfe-commits
https://github.com/bogner updated https://github.com/llvm/llvm-project/pull/71264 >From cab6bcd73081fcbe9807adbf60b345f8d9e654e4 Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Fri, 3 Nov 2023 18:59:49 -0700 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?= =?UTF-

[clang-tools-extra] [llvm] [libunwind] [mlir] [lld] [libc] [clang] [flang] [libcxx] [libcxxabi] [lldb] [openmp] [Clang][Sema] Don't say "is declared here" for invalid template locations (PR #71264)

2023-11-30 Thread Justin Bogner via cfe-commits
@@ -7909,6 +7903,37 @@ bool Sema::CheckTemplateTemplateArgument(TemplateTemplateParmDecl *Param, Arg.getLocation()); } +static Sema::SemaDiagnosticBuilder noteLocation(Sema &S, const NamedDecl &Decl, +

[clang] [llvm] [DXIL] `exp`, `any`, `lerp`, & `rcp` Intrinsic Lowering (PR #84526)

2024-03-13 Thread Justin Bogner via cfe-commits
https://github.com/bogner edited https://github.com/llvm/llvm-project/pull/84526 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DXIL] `exp`, `any`, `lerp`, & `rcp` Intrinsic Lowering (PR #84526)

2024-03-13 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,105 @@ +; RUN: opt -S -dxil-op-lower < %s | FileCheck %s + +; Make sure dxil operation function calls for any are generated for float and half. + +; CHECK:icmp ne i1 %{{.*}}, false +define noundef i1 @any_bool(i1 noundef %p0) { bogner wrote: Probably

[clang] [llvm] [DXIL] `exp`, `any`, `lerp`, & `rcp` Intrinsic Lowering (PR #84526)

2024-03-13 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. A couple more very minor notes on the tests, then this LGTM https://github.com/llvm/llvm-project/pull/84526 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] [llvm] [DXIL] `exp`, `any`, `lerp`, & `rcp` Intrinsic Lowering (PR #84526)

2024-03-13 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,105 @@ +; RUN: opt -S -dxil-op-lower < %s | FileCheck %s + +; Make sure dxil operation function calls for any are generated for float and half. + +; CHECK:icmp ne i1 %{{.*}}, false bogner wrote: Folks usually put a space between `CHECK:` and the thing

[clang] [llvm] [HLSL] Implement `rsqrt` intrinsic (PR #84820)

2024-03-14 Thread Justin Bogner via cfe-commits
https://github.com/bogner edited https://github.com/llvm/llvm-project/pull/84820 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Implement `rsqrt` intrinsic (PR #84820)

2024-03-14 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/84820 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Implement `rsqrt` intrinsic (PR #84820)

2024-03-14 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,26 @@ +; RUN: opt -S -dxil-op-lower < %s | FileCheck %s + +; Make sure dxil operation function calls for rsqrt are generated for float and half. +; CHECK:call float @dx.op.unary.f32(i32 25, float %{{.*}}) +; CHECK:call half @dx.op.unary.f16(i32 25, half %{{.*}}) --

[clang] [llvm] [HLSL] implement the `isinf` intrinsic (PR #84927)

2024-03-14 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/84927 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] implement the `isinf` intrinsic (PR #84927)

2024-03-14 Thread Justin Bogner via cfe-commits
https://github.com/bogner edited https://github.com/llvm/llvm-project/pull/84927 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] implement the `isinf` intrinsic (PR #84927)

2024-03-14 Thread Justin Bogner via cfe-commits
@@ -18050,6 +18050,21 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned BuiltinID, /*ReturnType=*/Op0->getType(), Intrinsic::dx_frac, ArrayRef{Op0}, nullptr, "dx.frac"); } + case Builtin::BI__builtin_hlsl_elementwise_isinf: { +Value *Op0 = EmitScal

[clang] [llvm] [HLSL] implement `clamp` intrinsic (PR #85424)

2024-03-15 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/85424 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] implement `clamp` intrinsic (PR #85424)

2024-03-15 Thread Justin Bogner via cfe-commits
https://github.com/bogner edited https://github.com/llvm/llvm-project/pull/85424 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] implement `clamp` intrinsic (PR #85424)

2024-03-15 Thread Justin Bogner via cfe-commits
@@ -252,6 +252,116 @@ double3 ceil(double3); _HLSL_BUILTIN_ALIAS(__builtin_elementwise_ceil) double4 ceil(double4); +//===--===// +// clamp builtins +//===--

[clang] [llvm] [HLSL] implement `clamp` intrinsic (PR #85424)

2024-03-15 Thread Justin Bogner via cfe-commits
@@ -132,12 +134,60 @@ static bool expandRcpIntrinsic(CallInst *Orig) { return true; } +static Intrinsic::ID getCorrectMaxIntrinsic(Type *elemTy, +Intrinsic::ID clampIntrinsic) { bogner wrote: I could see us needin

[clang] [HLSL] Fix for build break introduced by #85662 (PR #85839)

2024-03-19 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/85839 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Fix for build break introduced by #85662 (PR #85839)

2024-03-19 Thread Justin Bogner via cfe-commits
https://github.com/bogner closed https://github.com/llvm/llvm-project/pull/85839 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Fix for build break introduced by #85662 (PR #85839)

2024-03-19 Thread Justin Bogner via cfe-commits
bogner wrote: I've gone ahead and merged this since it fixes the build break. In the future when you see a build break, please just revert the breaking change to get the build green again and then work on the fixed patch. It's unfair to others using trunk to have to wait on a fix for an obviou

[clang] [HLSL] Add validation for the -enable-16bit-types option (PR #85340)

2024-03-26 Thread Justin Bogner via cfe-commits
@@ -753,7 +753,10 @@ def err_drv_hlsl_unsupported_target : Error< "HLSL code generation is unsupported for target '%0'">; def err_drv_hlsl_bad_shader_required_in_target : Error< "%select{shader model|Vulkan environment|shader stage}0 is required as %select{OS|environment}1

[clang] [HLSL] Add validation for the -enable-16bit-types option (PR #85340)

2024-03-26 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,20 @@ +// RUN: not %clang_dxc -enable-16bit-types -T cs_6_0 -HV 2016 %s 2>&1 | FileCheck -check-prefix=both_invalid %s +// RUN: not %clang_dxc -enable-16bit-types -T lib_6_4 -HV 2017 %s 2>&1 | FileCheck -check-prefix=HV_invalid %s +// RUN: not %clang_dxc -enable-16bi

[clang] [HLSL] enforce unsigned types for reversebits (PR #86720)

2024-03-26 Thread Justin Bogner via cfe-commits
@@ -54,31 +29,6 @@ uint16_t4 test_bitreverse_ushort4(uint16_t4 p0) } #endif -// CHECK: define noundef i32 @ -// CHECK: call i32 @llvm.bitreverse.i32( -int test_bitreverse_int(int p0) -{ - return reversebits(p0); -} bogner wrote: Will these implicitly co

[clang] [HLSL] enforce unsigned types for reversebits (PR #86720)

2024-03-26 Thread Justin Bogner via cfe-commits
@@ -54,31 +29,6 @@ uint16_t4 test_bitreverse_ushort4(uint16_t4 p0) } #endif -// CHECK: define noundef i32 @ -// CHECK: call i32 @llvm.bitreverse.i32( -int test_bitreverse_int(int p0) -{ - return reversebits(p0); -} bogner wrote: In that case we might ne

[clang] [HLSL] enforce unsigned types for reversebits (PR #86720)

2024-03-26 Thread Justin Bogner via cfe-commits
@@ -54,31 +29,6 @@ uint16_t4 test_bitreverse_ushort4(uint16_t4 p0) } #endif -// CHECK: define noundef i32 @ -// CHECK: call i32 @llvm.bitreverse.i32( -int test_bitreverse_int(int p0) -{ - return reversebits(p0); -} bogner wrote: Alright, let's get this

[clang] [HLSL] enforce unsigned types for reversebits (PR #86720)

2024-03-26 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/86720 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Doc][HLSL] Add documentation for root signature. (PR #83933)

2024-03-27 Thread Justin Bogner via cfe-commits
https://github.com/bogner edited https://github.com/llvm/llvm-project/pull/83933 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Doc][HLSL] Add documentation for root signature. (PR #83933)

2024-03-27 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,426 @@ + +HLSL Root Signatures + + +.. contents:: + :local: + +Usage += + +In HLSL, the `root signature +`_ +defines what types of resources are bo

[clang] [Doc][HLSL] Add documentation for root signature. (PR #83933)

2024-03-27 Thread Justin Bogner via cfe-commits
https://github.com/bogner commented: Ran into some problems when building `clang-docs-html` to look at this, so here are some notes on fixing those issues. I'll do another pass on the content next. https://github.com/llvm/llvm-project/pull/83933 ___ c

[clang] [Doc][HLSL] Add documentation for root signature. (PR #83933)

2024-03-27 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,426 @@ + +HLSL Root Signatures + + +.. contents:: + :local: + +Usage += + +In HLSL, the `root signature +`_ +defines what types of resources are bo

[clang] [Doc][HLSL] Add documentation for root signature. (PR #83933)

2024-03-27 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,426 @@ + +HLSL Root Signatures + + +.. contents:: + :local: + +Usage += + +In HLSL, the `root signature +`_ +defines what types of resources are bo

[clang] [Doc][HLSL] Add documentation for root signature. (PR #83933)

2024-03-27 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,426 @@ + +HLSL Root Signatures + + +.. contents:: + :local: + +Usage += + +In HLSL, the `root signature +`_ +defines what types of resources are bo

[clang] [Doc][HLSL] Add documentation for root signature. (PR #83933)

2024-03-27 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,426 @@ + +HLSL Root Signatures + + +.. contents:: + :local: + +Usage += + +In HLSL, the `root signature +`_ +defines what types of resources are bo

[clang] [Doc][HLSL] Add documentation for root signature. (PR #83933)

2024-03-27 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,426 @@ + +HLSL Root Signatures + + +.. contents:: + :local: + +Usage += + +In HLSL, the `root signature +`_ +defines what types of resources are bo

[clang] [Doc][HLSL] Add documentation for root signature. (PR #83933)

2024-03-27 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,426 @@ + +HLSL Root Signatures + + +.. contents:: + :local: + +Usage += + +In HLSL, the `root signature +`_ +defines what types of resources are bo

[clang] [Doc][HLSL] Add documentation for root signature. (PR #83933)

2024-03-27 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,426 @@ + +HLSL Root Signatures + + +.. contents:: + :local: + +Usage += + +In HLSL, the `root signature +`_ +defines what types of resources are bo

[clang] [Doc][HLSL] Add documentation for root signature. (PR #83933)

2024-03-27 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,426 @@ + +HLSL Root Signatures + + +.. contents:: + :local: + +Usage += + +In HLSL, the `root signature +`_ +defines what types of resources are bo

[clang] [Doc][HLSL] Add documentation for root signature. (PR #83933)

2024-03-27 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,426 @@ + +HLSL Root Signatures + + +.. contents:: + :local: + +Usage += + +In HLSL, the `root signature +`_ +defines what types of resources are bo

[clang] [Doc][HLSL] Add documentation for root signature. (PR #83933)

2024-03-27 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,426 @@ + +HLSL Root Signatures + + +.. contents:: + :local: + +Usage += + +In HLSL, the `root signature +`_ +defines what types of resources are bo

[clang] [Doc][HLSL] Add documentation for root signature. (PR #83933)

2024-03-27 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,426 @@ + +HLSL Root Signatures + + +.. contents:: + :local: + +Usage += + +In HLSL, the `root signature +`_ +defines what types of resources are bo

[clang] [Doc][HLSL] Add documentation for root signature. (PR #83933)

2024-03-28 Thread Justin Bogner via cfe-commits
bogner wrote: I think it would be helpful to add a section between the usage part and the grammar that discusses where and why in the compiler we need access to the parsed root signature (ie, in Sema for diagnostics, in the backend to verify resource usage matches, and also in the backend to l

[clang] Add clang_elementwise_builtin_alias (PR #86175)

2024-03-28 Thread Justin Bogner via cfe-commits
bogner wrote: Thanks for working on this, but I think that what this shows is that the complexity of adding this elementwise alias builtin isn't quite justified by the utility. It's certainly convenient to be able to specify the builtins this way, but validation is a lot more complicated and I

[clang] [llvm] [HLSL][DXIL] HLSL's `round` should follow `roundeven` behavior (PR #87078)

2024-03-29 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/87078 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][DXIL][SPIRV] Intrinsic unification PR (PR #87034)

2024-03-29 Thread Justin Bogner via cfe-commits
bogner wrote: I have some misgivings about abusing the target intrinsic infrastructure like this to create "target" intrinsics for a non-existent target. IMO this is morally equivalent to just putting all of these intrinsics as generic llvm intrinsics (`llvm.thread_id` or `llvm.all`), just wit

[clang] [HLSL] Implement floating literal suffixes (PR #87270)

2024-04-01 Thread Justin Bogner via cfe-commits
https://github.com/bogner edited https://github.com/llvm/llvm-project/pull/87270 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement floating literal suffixes (PR #87270)

2024-04-01 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/87270 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement floating literal suffixes (PR #87270)

2024-04-01 Thread Justin Bogner via cfe-commits
@@ -4117,14 +4117,17 @@ ExprResult Sema::ActOnNumericConstant(const Token &Tok, Scope *UDLScope) { } else if (Literal.isFloatingLiteral()) { QualType Ty; if (Literal.isHalf){ - if (getOpenCLOptions().isAvailableOption("cl_khr_fp16", getLangOpts())) + if (ge

[clang] [NFC] Add API documentation and annotations (PR #78635)

2024-02-13 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/78635 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] implement `mad` intrinsic (PR #83826)

2024-03-05 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/83826 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] implement exp intrinsic (PR #83832)

2024-03-05 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/83832 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   5   6   7   8   9   >