[clang] [llvm] [HLSL] Adding HLSL `clip` function. (PR #114588)

2024-11-07 Thread Finn Plummer via cfe-commits
@@ -63,6 +63,7 @@ #include "llvm/IR/MemoryModelRelaxationAnnotations.h" #include "llvm/Support/AMDGPUAddrSpace.h" #include "llvm/Support/ConvertUTF.h" +#include "llvm/Support/ErrorHandling.h" inbelic wrote: What is this used for? https://github.com/llvm/llvm-

[clang] [llvm] [HLSL] Adding HLSL `clip` function. (PR #114588)

2024-11-07 Thread Finn Plummer via cfe-commits
@@ -0,0 +1,77 @@ +; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv-unknown-unknown %s -o - | FileCheck %s --check-prefixes=CHECK,SPIRV15 +; RUN: llc -verify-machineinstrs -spirv-ext=+SPV_EXT_demote_to_helper_invocation -O0 -mtriple=spirv32v1.6-unknown-unknown %s -o - | FileC

[clang] [llvm] [HLSL] Adding HLSL `clip` function. (PR #114588)

2024-11-07 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/114588 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Adding HLSL `clip` function. (PR #114588)

2024-11-07 Thread via cfe-commits
@@ -99,6 +99,42 @@ static void initializeAlloca(CodeGenFunction &CGF, AllocaInst *AI, Value *Size, I->addAnnotationMetadata("auto-init"); } +static Value *handleHlslClip(const CallExpr *E, CodeGenFunction *CGF) { + Value *Op0 = CGF->EmitScalarExpr(E->getArg(0)); + + Const

[clang] [llvm] [DXIL][SPIRV] Lower `WaveActiveCountBits` intrinsic (PR #113382)

2024-11-07 Thread Sarah Spall via cfe-commits
https://github.com/spall approved this pull request. https://github.com/llvm/llvm-project/pull/113382 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Remove Linux search paths on Windows (PR #113628)

2024-11-07 Thread David Salinas via cfe-commits
https://github.com/david-salinas updated https://github.com/llvm/llvm-project/pull/113628 >From 4fad2d64582471816adc18f78294288bcaee0d63 Mon Sep 17 00:00:00 2001 From: David Salinas Date: Tue, 22 Oct 2024 18:58:47 + Subject: [PATCH] Remove Linux search paths on Windows Change-Id: Ia0b44eb1

[clang] [Clang] Improve EmitClangAttrSpellingListIndex (PR #114899)

2024-11-07 Thread Chinmay Deshpande via cfe-commits
chinmaydd wrote: Thanks @erichkeane and @arsenm ! https://github.com/llvm/llvm-project/pull/114899 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 15d1560 - [Clang] Improve EmitClangAttrSpellingListIndex (#114899)

2024-11-07 Thread via cfe-commits
Author: Chinmay Deshpande Date: 2024-11-07T13:01:58-08:00 New Revision: 15d1560ea4047a2b4b14c826767089f538ddda70 URL: https://github.com/llvm/llvm-project/commit/15d1560ea4047a2b4b14c826767089f538ddda70 DIFF: https://github.com/llvm/llvm-project/commit/15d1560ea4047a2b4b14c826767089f538ddda70.d

[clang] [Clang] Improve EmitClangAttrSpellingListIndex (PR #114899)

2024-11-07 Thread Chinmay Deshpande via cfe-commits
https://github.com/chinmaydd closed https://github.com/llvm/llvm-project/pull/114899 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ASTWriter] Detect more non-affecting FileIDs to reduce source location duplication (PR #112015)

2024-11-07 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 approved this pull request. Sounds good, thank you! https://github.com/llvm/llvm-project/pull/112015 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Improve EmitClangAttrSpellingListIndex (PR #114899)

2024-11-07 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `libc-x86_64-debian-dbg-runtimes-build` running on `libc-x86_64-debian` while building `clang` at step 4 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/78/builds/9236 Here is the relevant

[clang] [Clang] Improve EmitClangAttrSpellingListIndex (PR #114899)

2024-11-07 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-x86_64-debian` running on `lldb-x86_64-debian` while building `clang` at step 4 "build". Full details are available at: https://lab.llvm.org/buildbot/#/builders/162/builds/10003 Here is the relevant piece of the build l

[clang] [Clang] Improve EmitClangAttrSpellingListIndex (PR #114899)

2024-11-07 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-ve-ninja` running on `hpce-ve-main` while building `clang` at step 4 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/12/builds/9158 Here is the relevant piece of the build log for th

[clang] [HLSL] Add Append/ConsumeStructuredBuffer definitions to HLSLExternalSemaSource (PR #113643)

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

[clang] [HLSL] Add Append/ConsumeStructuredBuffer definitions to HLSLExternalSemaSource (PR #113643)

2024-11-07 Thread Justin Bogner via cfe-commits
bogner wrote: I'm not entirely convinced that these AST tests that are all more or less duplicates of each other are really worth it for every single buffer type. They aren't easy to read or update and they vary from one another by literally just a few charac

[clang] [HLSL] Add Append/ConsumeStructuredBuffer definitions to HLSLExternalSemaSource (PR #113643)

2024-11-07 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. Looks good. I have a comment about the testing strategy in general but that can be addressed separately from this PR. https://github.com/llvm/llvm-project/pull/113643 ___ cfe-commits mailing list c

[clang] [Clang] add wraps and no_wraps attributes (PR #115094)

2024-11-07 Thread Justin Stitt via cfe-commits
https://github.com/JustinStitt updated https://github.com/llvm/llvm-project/pull/115094 >From f58e6481650f8cda6089b2a0637c94596a45370e Mon Sep 17 00:00:00 2001 From: Justin Stitt Date: Tue, 5 Mar 2024 03:14:49 + Subject: [PATCH 1/6] add wraps, no_wraps attributes --- clang/docs/ReleaseNot

[clang] [Clang] Improve EmitClangAttrSpellingListIndex (PR #114899)

2024-11-07 Thread Chinmay Deshpande via cfe-commits
chinmaydd wrote: Fixed by https://github.com/llvm/llvm-project/commit/dd1c99bac4dc1d5ceeadc79dd31fa12f3e615f18 https://github.com/llvm/llvm-project/pull/114899 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[clang] [clang][serialization] Pass `ASTContext` explicitly (PR #115235)

2024-11-07 Thread Ben Langmuir via cfe-commits
@@ -4753,15 +4755,12 @@ void ASTWriter::AddString(StringRef Str, RecordDataImpl &Record) { } bool ASTWriter::PreparePathForOutput(SmallVectorImpl &Path) { - assert(Context && "should have context when outputting path"); - // Leave special file names as they are. String

[clang] dd1c99b - [TableGen] Fix a warning

2024-11-07 Thread Kazu Hirata via cfe-commits
Author: Kazu Hirata Date: 2024-11-07T13:12:40-08:00 New Revision: dd1c99bac4dc1d5ceeadc79dd31fa12f3e615f18 URL: https://github.com/llvm/llvm-project/commit/dd1c99bac4dc1d5ceeadc79dd31fa12f3e615f18 DIFF: https://github.com/llvm/llvm-project/commit/dd1c99bac4dc1d5ceeadc79dd31fa12f3e615f18.diff L

[clang] [HLSL] Add Append/ConsumeStructuredBuffer definitions to HLSLExternalSemaSource (PR #113643)

2024-11-07 Thread Greg Roth via cfe-commits
@@ -0,0 +1,50 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-library -x hlsl -ast-dump -DEMPTY %s | FileCheck -check-prefix=EMPTY %s +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-library -x hlsl -ast-dump %s | FileCheck %s + + +// This test tests two different AST ge

[clang] [HLSL] Add Append/ConsumeStructuredBuffer definitions to HLSLExternalSemaSource (PR #113643)

2024-11-07 Thread Greg Roth via cfe-commits
https://github.com/pow2clk commented: Looks good overall. I am worried about that typedbuffer enum though. Perhaps it doesn't have much impact as of yet, but perhaps we need to change some conditionals to accept structuredbuffer enums where appropriate. https://github.com/llvm/llvm-project/pul

[clang] [clang][serialization] Pass `ASTContext` explicitly (PR #115235)

2024-11-07 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir approved this pull request. https://github.com/llvm/llvm-project/pull/115235 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add Append/ConsumeStructuredBuffer definitions to HLSLExternalSemaSource (PR #113643)

2024-11-07 Thread Greg Roth via cfe-commits
@@ -530,6 +530,28 @@ void HLSLExternalSemaSource::defineHLSLTypesWithForwardDeclarations() { .addArraySubscriptOperators() .completeDefinition(); }); + + Decl = + BuiltinTypeDeclBuilder(*SemaPtr, HLSLNamespace, "AppendStructuredBuffer") + .addS

[clang] [Driver][OpenMP] Fix OpenMP target-toolchain-option parser (PR #115375)

2024-11-07 Thread Jefferson Le Quellec via cfe-commits
https://github.com/jle-quel created https://github.com/llvm/llvm-project/pull/115375 ## Description This PR fixes a segmentation fault that occurs when passing options requiring arguments via `-Xopenmp-target=`. The issue was that the function `Driver::getOffloadArchs` did not properly parse

[clang] [Driver][OpenMP] Fix OpenMP target-toolchain-option parser (PR #115375)

2024-11-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Jefferson Le Quellec (jle-quel) Changes ## Description This PR fixes a segmentation fault that occurs when passing options requiring arguments via `-Xopenmp-target=`. The issue was that the function `Driver::getOffloadArch

[clang] [Driver][OpenMP] Fix OpenMP target-toolchain-option parser (PR #115375)

2024-11-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jefferson Le Quellec (jle-quel) Changes ## Description This PR fixes a segmentation fault that occurs when passing options requiring arguments via `-Xopenmp-target=`. The issue was that the function `Driver::getOffloadArchs` did

[clang] 7475156 - [Clang] Add __builtin_counted_by_ref builtin (#114495)

2024-11-07 Thread via cfe-commits
Author: Bill Wendling Date: 2024-11-07T22:03:55Z New Revision: 7475156d49406785a974b1205d11fe3de9c1553e URL: https://github.com/llvm/llvm-project/commit/7475156d49406785a974b1205d11fe3de9c1553e DIFF: https://github.com/llvm/llvm-project/commit/7475156d49406785a974b1205d11fe3de9c1553e.diff LOG:

[clang] [llvm] [HLSL] Add `Increment`/`DecrementCounter` methods to structured buffers (PR #114148)

2024-11-07 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/114148 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] add wraps and no_wraps attributes (PR #115094)

2024-11-07 Thread Justin Stitt via cfe-commits
https://github.com/JustinStitt updated https://github.com/llvm/llvm-project/pull/115094 >From b5515eba87ffd96d010952bf18fe4044861df298 Mon Sep 17 00:00:00 2001 From: Justin Stitt Date: Tue, 5 Mar 2024 03:14:49 + Subject: [PATCH 1/6] add wraps, no_wraps attributes --- clang/docs/ReleaseNot

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2024-11-07 Thread Erich Keane via cfe-commits
@@ -2234,6 +2234,17 @@ enum class CXXNewInitializationStyle { Braces }; +struct ImplicitAllocationParameters { + bool PassTypeIdentity; erichkeane wrote: For things that are stored (I think these arent?), we typically prefer bitfields for size. As far as

[clang] Reapply "[Clang][Sema] Always use latest redeclaration of primary template" (PR #114569)

2024-11-07 Thread Lei Wang via cfe-commits
wlei-llvm wrote: Hi, here is the reduced repro (not perfect, but was as far as I can get), thanks! ``` namespace std { template _Tp __declval(long); template auto declval() noexcept -> decltype(__declval<_Tp>(0)); template class __is_convertible_helper { template

[clang] [llvm] [HLSL] Adding HLSL `clip` function. (PR #114588)

2024-11-07 Thread via cfe-commits
@@ -89,6 +89,7 @@ let TargetPrefix = "spv" in { def int_spv_sign : DefaultAttrsIntrinsic<[LLVMScalarOrSameVectorWidth<0, llvm_i32_ty>], [llvm_any_ty], [IntrNoMem]>; def int_spv_radians : DefaultAttrsIntrinsic<[LLVMMatchType<0>], [llvm_anyfloat_ty], [IntrNoMem]>; def int

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2024-11-07 Thread Erich Keane via cfe-commits
@@ -4749,6 +4753,15 @@ class Sema final : public SemaBase { CXXRecordDecl *getStdBadAlloc() const; EnumDecl *getStdAlignValT() const; + ClassTemplateDecl *getStdTypeIdentity() const; + std::optional InstantiateSpecializedTypeIdentity(QualType Subject); e

[clang] [llvm] [DXIL][SPIRV] Lower `WaveActiveCountBits` intrinsic (PR #113382)

2024-11-07 Thread Finn Plummer via cfe-commits
@@ -1762,6 +1765,37 @@ bool SPIRVInstructionSelector::selectSign(Register ResVReg, return Result; } +bool SPIRVInstructionSelector::selectWaveActiveCountBits( +Register ResVReg, const SPIRVType *ResType, MachineInstr &I) const { + assert(I.getNumOperands() == 3); + as

[clang] [llvm] [HLSL] Add `Increment`/`DecrementCounter` methods to structured buffers (PR #114148)

2024-11-07 Thread Helena Kotas via cfe-commits
@@ -0,0 +1,771 @@ +//===--- HLSLExternalSemaSource.cpp - HLSL Sema Source ===// hekota wrote: Oops! :) https://github.com/llvm/llvm-project/pull/114148 ___ cfe-commits mailing list cfe-commits@list

[clang] [libunwind] [llvm] Replace documentation mentions of IRC with Discord (PR #114276)

2024-11-07 Thread Nick Desaulniers via cfe-commits
nickdesaulniers wrote: LGTM https://github.com/llvm/llvm-project/pull/114276 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Improve EmitClangAttrSpellingListIndex (PR #114899)

2024-11-07 Thread Nikita Popov via cfe-commits
@@ -153,12 +155,37 @@ std::string AttributeCommonInfo::getNormalizedFullName() const { normalizeName(getAttrName(), getScopeName(), getSyntax())); } +// Sorted list of attribute scope names +static constexpr std::pair ScopeList[] = +{{"", AttributeCommonInfo::Scope:

[clang] [clang/AST] Make it possible to use SwiftAttr in type context (PR #108631)

2024-11-07 Thread Pavel Yaskevich via cfe-commits
xedin wrote: I think if `noderef` attribute instantiations in your example are considered unique when they appear in different spots then we should have two distinct attributed types but it sounds like both of `noderef` should have one `Attr *` instantiation... https://github.com/llvm/llvm-pr

[clang] [Clang] Improve EmitClangAttrSpellingListIndex (PR #114899)

2024-11-07 Thread Erich Keane via cfe-commits
@@ -153,12 +155,37 @@ std::string AttributeCommonInfo::getNormalizedFullName() const { normalizeName(getAttrName(), getScopeName(), getSyntax())); } +// Sorted list of attribute scope names +static constexpr std::pair ScopeList[] = +{{"", AttributeCommonInfo::Scope:

[clang] [compiler-rt] [llvm] [FMV] Remove feature dgh. (PR #115363)

2024-11-07 Thread Jon Roelofs via cfe-commits
https://github.com/jroelofs approved this pull request. https://github.com/llvm/llvm-project/pull/115363 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add implicit resource element type concepts to AST (PR #112600)

2024-11-07 Thread Joshua Batista via cfe-commits
@@ -323,30 +324,127 @@ struct TemplateParameterListBuilder { S.Context, Builder.Record->getDeclContext(), SourceLocation(), SourceLocation(), /* TemplateDepth */ 0, Position, &S.Context.Idents.get(Name, tok::TokenKind::identifier), -/* Typename *

[clang] [llvm] [HLSL] Add `Increment`/`DecrementCounter` methods to structured buffers (PR #114148)

2024-11-07 Thread Greg Roth via cfe-commits
@@ -343,27 +336,224 @@ struct TemplateParameterListBuilder { Params.clear(); QualType T = Builder.Template->getInjectedClassNameSpecialization(); -T = S.Context.getInjectedClassNameType(Builder.Record, T); +T = AST.getInjectedClassNameType(Builder.Record, T);

[clang] [llvm] [HLSL] Add `Increment`/`DecrementCounter` methods to structured buffers (PR #114148)

2024-11-07 Thread Greg Roth via cfe-commits
@@ -0,0 +1,22 @@ +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -emit-llvm-only -disable-llvm-passes -verify + +using handle_t = __hlsl_resource_t [[hlsl::resource_class(UAV)]] [[hlsl::contained_type(int)]]; + +void test_args(int x, bool b

[clang] [llvm] [HLSL] Add `Increment`/`DecrementCounter` methods to structured buffers (PR #114148)

2024-11-07 Thread Greg Roth via cfe-commits
@@ -35,6 +35,9 @@ def int_dx_typedBufferLoad_checkbit def int_dx_typedBufferStore : DefaultAttrsIntrinsic<[], [llvm_any_ty, llvm_i32_ty, llvm_anyvector_ty]>; +def int_dx_bufferUpdateCounter +: DefaultAttrsIntrinsic<[llvm_i32_ty], [llvm_any_ty, llvm_i32_ty], [IntrWrite

[clang] [clang][CIR] Move CIRGen types into clang::CIRGen (PR #115385)

2024-11-07 Thread Shoaib Meenai via cfe-commits
https://github.com/smeenai created https://github.com/llvm/llvm-project/pull/115385 https://github.com/llvm/clangir/issues/1025 explains why we want to move the CIR dialect from the `mlir::cir` to the `cir` namespace. To avoid overloading the `cir` namespace too much afterwards, move all symbols

[clang] [clang][CIR] Move CIRGen types into clang::CIRGen (PR #115385)

2024-11-07 Thread Shoaib Meenai via cfe-commits
smeenai wrote: Stack from [ghstack](https://github.com/ezyang/ghstack) (oldest at bottom): * (to be filled) https://github.com/llvm/llvm-project/pull/115385 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[clang] [Clang] Improve EmitClangAttrSpellingListIndex (PR #114899)

2024-11-07 Thread Chinmay Deshpande via cfe-commits
@@ -153,12 +155,37 @@ std::string AttributeCommonInfo::getNormalizedFullName() const { normalizeName(getAttrName(), getScopeName(), getSyntax())); } +// Sorted list of attribute scope names +static constexpr std::pair ScopeList[] = +{{"", AttributeCommonInfo::Scope:

[clang] 53e49f1 - [clang][serialization] Pass `ASTContext` explicitly (#115235)

2024-11-07 Thread via cfe-commits
Author: Jan Svoboda Date: 2024-11-07T14:40:21-08:00 New Revision: 53e49f15ab0b9b03e5671faea6f7870914b8f0ea URL: https://github.com/llvm/llvm-project/commit/53e49f15ab0b9b03e5671faea6f7870914b8f0ea DIFF: https://github.com/llvm/llvm-project/commit/53e49f15ab0b9b03e5671faea6f7870914b8f0ea.diff L

[clang] [clang][serialization] Pass `ASTContext` explicitly (PR #115235)

2024-11-07 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 closed https://github.com/llvm/llvm-project/pull/115235 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Add `Increment`/`DecrementCounter` methods to structured buffers (PR #114148)

2024-11-07 Thread Greg Roth via cfe-commits
@@ -271,53 +246,70 @@ struct BuiltinTypeDeclBuilder { return *this; } + FieldDecl *getResourceHandleField() { +FieldDecl *FD = Fields["h"]; +assert(FD && FD->getType()->isHLSLAttributedResourceType() && + "record does not have resource handle"); +r

[clang] [HLSL] Add implicit resource element type concepts to AST (PR #112600)

2024-11-07 Thread Joshua Batista via cfe-commits
@@ -323,30 +324,127 @@ struct TemplateParameterListBuilder { S.Context, Builder.Record->getDeclContext(), SourceLocation(), SourceLocation(), /* TemplateDepth */ 0, Position, &S.Context.Idents.get(Name, tok::TokenKind::identifier), -/* Typename *

[clang] [llvm] [HLSL] Adding HLSL `clip` function. (PR #114588)

2024-11-07 Thread Finn Plummer via cfe-commits
@@ -89,6 +89,7 @@ let TargetPrefix = "spv" in { def int_spv_sign : DefaultAttrsIntrinsic<[LLVMScalarOrSameVectorWidth<0, llvm_i32_ty>], [llvm_any_ty], [IntrNoMem]>; def int_spv_radians : DefaultAttrsIntrinsic<[LLVMMatchType<0>], [llvm_anyfloat_ty], [IntrNoMem]>; def int

[clang] [clang][serialization] Make `ASTWriter` work with `Preprocessor` only (PR #115237)

2024-11-07 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/115237 >From 24f60890a4a1cef2c9387040fce6d0864fcb01f4 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Wed, 6 Nov 2024 11:18:09 -0800 Subject: [PATCH] [clang][serialization] Make `ASTWriter` accept `Preprocessor`

[clang] [clang][serialization] Enable `ASTWriter` to work with `Preprocessor` only (PR #115237)

2024-11-07 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 edited https://github.com/llvm/llvm-project/pull/115237 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CIR] Move CIRGen types into clang::CIRGen (PR #115385)

2024-11-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir @llvm/pr-subscribers-clang Author: Shoaib Meenai (smeenai) Changes https://github.com/llvm/clangir/issues/1025 explains why we want to move the CIR dialect from the `mlir::cir` to the `cir` namespace. To avoid overloading the `cir` namespace too

[clang] [clang][serialization] Pass `ASTContext` explicitly (PR #115235)

2024-11-07 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/115235 >From 27985cf8df00f1edf6e74b7e50ce5be13569591c Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Wed, 6 Nov 2024 09:54:06 -0800 Subject: [PATCH 1/3] [clang][serialization] Pass `ASTContext` explicitly ---

[clang] [HLSL] Add implicit resource element type concepts to AST (PR #112600)

2024-11-07 Thread Joshua Batista via cfe-commits
@@ -323,30 +324,127 @@ struct TemplateParameterListBuilder { S.Context, Builder.Record->getDeclContext(), SourceLocation(), SourceLocation(), /* TemplateDepth */ 0, Position, &S.Context.Idents.get(Name, tok::TokenKind::identifier), -/* Typename *

[clang] [llvm] [HLSL] Add `Increment`/`DecrementCounter` methods to structured buffers (PR #114148)

2024-11-07 Thread Greg Roth via cfe-commits
@@ -271,53 +246,70 @@ struct BuiltinTypeDeclBuilder { return *this; } + FieldDecl *getResourceHandleField() { +FieldDecl *FD = Fields["h"]; +assert(FD && FD->getType()->isHLSLAttributedResourceType() && + "record does not have resource handle"); +r

[clang] [clang codegen] Add CreateRuntimeFunction overload that takes a clang type. (PR #113506)

2024-11-07 Thread Jonas Paulsson via cfe-commits
JonPsson1 wrote: LGTM, but maybe also update the FIXME comment in the original version of CreateRuntimeFunction(). https://github.com/llvm/llvm-project/pull/113506 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[clang] [clang][serialization] Enable `ASTWriter` to work with `Preprocessor` only (PR #115237)

2024-11-07 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 updated https://github.com/llvm/llvm-project/pull/115237 >From 24f60890a4a1cef2c9387040fce6d0864fcb01f4 Mon Sep 17 00:00:00 2001 From: Jan Svoboda Date: Wed, 6 Nov 2024 11:18:09 -0800 Subject: [PATCH 1/2] [clang][serialization] Make `ASTWriter` accept `Preproces

[clang] [llvm] [DXIL][SPIRV] Lower `WaveActiveCountBits` intrinsic (PR #113382)

2024-11-07 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/113382 >From 35731658c1769453f86dde6063b137a2c5aeca32 Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Fri, 18 Oct 2024 15:48:29 -0700 Subject: [PATCH 1/4] [DXIL][SPIRV] Lower WaveActiveCountBits intrinsic - add co

[clang] [llvm] [DXIL][SPIRV] Lower `WaveActiveCountBits` intrinsic (PR #113382)

2024-11-07 Thread Finn Plummer via cfe-commits
inbelic wrote: Rebased to resolve conflicts. https://github.com/llvm/llvm-project/pull/113382 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add clang atomic control options and attribute (PR #114841)

2024-11-07 Thread Yaxun Liu via cfe-commits
@@ -0,0 +1,30 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s +// RUN: %clang_cc1 -fsyntax-only -verify -fcuda-is-device %s +// RUN: %clang_cc1 -fsyntax-only -verify -fcuda-is-device %s \ +// RUN: -fatomic=no_fine_grained_memory:off,no_remote_memory:on,ignore_denormal_mode:on +

[clang] [compiler-rt] [llvm] [FMV] Remove feature dgh. (PR #115363)

2024-11-07 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea created https://github.com/llvm/llvm-project/pull/115363 It belongs to the HINT space so it can be executed as NOP if the hardware doesn't support it. Reviewed in ACLE -> https://github.com/ARM-software/acle/pull/357 >From 0a0ec7e01e82e5928f16bf7b8524cdaae0756e90 M

[clang] [compiler-rt] [llvm] [FMV] Remove feature dgh. (PR #115363)

2024-11-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Alexandros Lamprineas (labrinea) Changes It belongs to the HINT space so it can be executed as NOP if the hardware doesn't support it. Reviewed in ACLE -> https://github.com/ARM-software/acle/pull/357 --- Full diff: https://github.com/ll

[clang] [Clang] Improve EmitClangAttrSpellingListIndex (PR #114899)

2024-11-07 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/114899 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Improve EmitClangAttrSpellingListIndex (PR #114899)

2024-11-07 Thread Chinmay Deshpande via cfe-commits
https://github.com/chinmaydd updated https://github.com/llvm/llvm-project/pull/114899 >From cf4d70c23b2896483b452622300aa4c8c41c01e5 Mon Sep 17 00:00:00 2001 From: Chinmay Deshpande Date: Fri, 1 Nov 2024 19:49:52 -0400 Subject: [PATCH 1/6] [Clang] Improve EmitClangAttrSpellingListIndex EmitCla

[compiler-rt] [libunwind] [AArch64] Fix nofp regressions in compiler-rt and libunwind (PR #111235)

2024-11-07 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-aarch64-linux-bootstrap-hwasan` running on `sanitizer-buildbot12` while building `compiler-rt,libunwind` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/55/builds/3403

[clang] [OpenACC] Implement `loop` restrictions on `for` loops. (PR #115370)

2024-11-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Erich Keane (erichkeane) Changes OpenACC restricts the contents of a 'for' loop affected by a 'loop' construct without a 'seq'. The loop variable must be integer, pointer, or random-access-iterator, it must monotonically increase/decrease

[clang-tools-extra] Extend bugprone-use-after-move check to handle std::optional::reset() and std::any::reset() (PR #114255)

2024-11-07 Thread via cfe-commits
@@ -279,7 +281,7 @@ void UseAfterMoveFinder::getDeclRefs( if (DeclRef && BlockMap->blockContainingStmt(DeclRef) == Block) { // Ignore uses of a standard smart pointer that don't dereference the // pointer. - if (Operator || !isStandardSmartP

[clang] Recommit "[RISCV][FMV] Support target_version" (#111096)" (PR #111333)

2024-11-07 Thread Shafik Yaghmour via cfe-commits
shafik wrote: It looks like this change caused a regression: https://github.com/llvm/llvm-project/issues/115000 https://github.com/llvm/llvm-project/pull/111333 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[clang] [llvm] [DXIL][SPIRV] Lower `WaveActiveCountBits` intrinsic (PR #113382)

2024-11-07 Thread Sarah Spall via cfe-commits
@@ -1762,6 +1765,37 @@ bool SPIRVInstructionSelector::selectSign(Register ResVReg, return Result; } +bool SPIRVInstructionSelector::selectWaveActiveCountBits( +Register ResVReg, const SPIRVType *ResType, MachineInstr &I) const { + assert(I.getNumOperands() == 3); + as

[clang] [llvm] [RISCV] Add Smdbltrp and Ssdbltrp extension (PR #111837)

2024-11-07 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/111837 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Fix false positive in bugprone-throw-keyword-missing (PR #115302)

2024-11-07 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp created https://github.com/llvm/llvm-project/pull/115302 Fixes #115055 >From c6ad9d042612c63cb9862782f17082e07277fc2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20G=C3=A1lvez?= Date: Wed, 6 Nov 2024 08:52:06 + Subject: [PATCH] Fix false positive in bug

[clang-tools-extra] Fix false positive in bugprone-throw-keyword-missing (PR #115138)

2024-11-07 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp closed https://github.com/llvm/llvm-project/pull/115138 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fix for codegen Crash in Clang when using locator omp_all_memory with depobj construct (PR #114221)

2024-11-07 Thread Shilei Tian via cfe-commits
@@ -17,6 +17,15 @@ typedef void *omp_depend_t; void foo() {} +void tmainc(){ + omp_depend_t obj; +#pragma omp depobj(obj) depend(inout: omp_all_memory) +{ + volatile omp_depend_t temp = obj; +char* char_ptr = reinterpret_cast(temp); +char_ptr[0] = 1; +} ---

[clang] [Clang] Ensure default arguments in friend declarations are only allowed in defining declarations to prevent multiple reachable declarations (PR #113777)

2024-11-07 Thread Younan Zhang via cfe-commits
zyn0217 wrote: > @zyn0217 should all the commits be squashed into one? Of course. By saying “flesh out the commit message”, I meant to edit the PR description on github, which would become the final commit message when we merge the PR. https://github.com/llvm/llvm-project/pull/113777

[libcxx] [libcxxabi] [libunwind] [llvm] [libc++] Unify the benchmarks with the test suite (PR #101399)

2024-11-07 Thread Louis Dionne via cfe-commits
https://github.com/ldionne closed https://github.com/llvm/llvm-project/pull/101399 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C2y] Implement WG14 N3344 (PR #115313)

2024-11-07 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: Paper doesn't say, but presumably based on this patch, 'alternative #1' is what was accepted? https://github.com/llvm/llvm-project/pull/115313 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lis

[clang] [llvm] [AArch64][SVE] Change the immediate argument in svextq (PR #115340)

2024-11-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-aarch64 Author: None (SpencerAbson) Changes In order to align with `svext` and NEON `vext`/`vextq`, this patch changes immediate argument in `svextq` such that it refers to elements of the size of those of the source vector, rather than bytes.

[clang] [llvm] Introduce a new WebKit checker for a unchecked call arguments (#113708) (PR #114522)

2024-11-07 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa closed https://github.com/llvm/llvm-project/pull/114522 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C2y] Implement WG14 N3344 (PR #115313)

2024-11-07 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/115313 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add Smdbltrp and Ssdbltrp extension (PR #111837)

2024-11-07 Thread via cfe-commits
https://github.com/T-Tie updated https://github.com/llvm/llvm-project/pull/111837 >From 23aec55337764fc19a6b816ca238972f705dda9a Mon Sep 17 00:00:00 2001 From: T-Tie <160845405+t-...@users.noreply.github.com> Date: Thu, 10 Oct 2024 21:11:39 +0800 Subject: [PATCH 1/9] Update riscv-target-features

[clang] [llvm] [AArch64][SVE] Change the immediate argument in svextq (PR #115340)

2024-11-07 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (SpencerAbson) Changes In order to align with `svext` and NEON `vext`/`vextq`, this patch changes immediate argument in `svextq` such that it refers to elements of the size of those of the source vector, rather than bytes. The [spec

[clang] [Webkit Checkers] Introduce a Webkit checker for memory unsafe casts (PR #114606)

2024-11-07 Thread Ryosuke Niwa via cfe-commits
@@ -0,0 +1,117 @@ +//===- MemoryUnsafeCastChecker.cpp -*- C++ -*-==// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apach

[clang] [llvm] Introduce a new WebKit checker for a unchecked call arguments (#113708) (PR #114522)

2024-11-07 Thread Ryosuke Niwa via cfe-commits
@@ -55,10 +55,18 @@ bool isCheckedPtr(const clang::CXXRecordDecl *Class); /// not, std::nullopt if inconclusive. std::optional isUncounted(const clang::QualType T); +/// \returns true if \p Class is CheckedPtr capable AND not checked, false if +/// not, std::nullopt if inconcl

[clang] [Clang] Ensure default arguments in friend declarations are only allowed in defining declarations to prevent multiple reachable declarations (PR #113777)

2024-11-07 Thread Younan Zhang via cfe-commits
zyn0217 wrote: BTW, can you flesh out the commit message so we don't just have a single issue link there? Thanks https://github.com/llvm/llvm-project/pull/113777 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang] [llvm] [Transforms][Utils][PromoteMem2Reg] Propagate nnan and ninf flags on par with the nsz flag (PR #114271)

2024-11-07 Thread Paul Osmialowski via cfe-commits
https://github.com/pawosm-arm edited https://github.com/llvm/llvm-project/pull/114271 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [clang][Driver] Add RPATH by default (PR #115286)

2024-11-07 Thread Fangrui Song via cfe-commits
MaskRay wrote: Note: Some build systems want to handle DT_RUNPATH themselves (e.g. CMAKE_INSTALL_RPATH). Some distributions (e.g. Fedora) have policies against DT_RUNPATH for system packages. While I can understand why some folks want to make -frtlib-add-rpath the default, I am not sure this

[compiler-rt] [libunwind] [AArch64] Fix nofp regressions in compiler-rt and libunwind (PR #111235)

2024-11-07 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson closed https://github.com/llvm/llvm-project/pull/111235 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Webkit Checkers] Introduce a Webkit checker for memory unsafe casts (PR #114606)

2024-11-07 Thread Ryosuke Niwa via cfe-commits
@@ -0,0 +1,117 @@ +//===- MemoryUnsafeCastChecker.cpp -*- C++ -*-==// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apach

[clang] Add clang atomic control options and attribute (PR #114841)

2024-11-07 Thread Yaxun Liu via cfe-commits
@@ -1093,6 +1097,169 @@ inline void FPOptions::applyChanges(FPOptionsOverride FPO) { *this = FPO.applyOverrides(*this); } +/// Atomic control options +class AtomicOptionsOverride; +class AtomicOptions { +public: + using storage_type = uint16_t; + + static constexpr unsign

[clang] [Clang] skip default argument instantiation for non-defining friend declarations without specialization info to meet [dcl.fct.default] p4 (PR #113777)

2024-11-07 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: @zyn0217 meant the PR description, which is the body of the commit, not the title. I already fixed it for you. https://github.com/llvm/llvm-project/pull/113777 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.

[clang] f8b9616 - [Clang] skip default argument instantiation for non-defining friend declarations (#113777)

2024-11-07 Thread via cfe-commits
Author: Oleksandr T. Date: 2024-11-07T14:13:04-03:00 New Revision: f8b96160feb99b3fc37b1857caf2abcfea7e5a06 URL: https://github.com/llvm/llvm-project/commit/f8b96160feb99b3fc37b1857caf2abcfea7e5a06 DIFF: https://github.com/llvm/llvm-project/commit/f8b96160feb99b3fc37b1857caf2abcfea7e5a06.diff

[clang] [Clang] skip default argument instantiation for non-defining friend declarations without specialization info to meet [dcl.fct.default] p4 (PR #113777)

2024-11-07 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov closed https://github.com/llvm/llvm-project/pull/113777 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Driver][SYCL] Add initial SYCL offload compilation support (PR #107493)

2024-11-07 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM, any concerns from you @MaskRay? https://github.com/llvm/llvm-project/pull/107493 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[clang] e8b7d8b - [FMV][AArch64] Remove features which expose non exploitable runtime behavior. (#114387)

2024-11-07 Thread via cfe-commits
Author: Alexandros Lamprineas Date: 2024-11-07T17:15:23Z New Revision: e8b7d8bfb5692d73df3d8e728925f62fb3bd9ec5 URL: https://github.com/llvm/llvm-project/commit/e8b7d8bfb5692d73df3d8e728925f62fb3bd9ec5 DIFF: https://github.com/llvm/llvm-project/commit/e8b7d8bfb5692d73df3d8e728925f62fb3bd9ec5.di

[clang] [compiler-rt] [llvm] [FMV][AArch64] Remove features which expose non exploitable runtime behavior. (PR #114387)

2024-11-07 Thread Alexandros Lamprineas via cfe-commits
https://github.com/labrinea closed https://github.com/llvm/llvm-project/pull/114387 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add empty struct test cases to `__builtin_hlsl_is_typed_resource_element_compatible` test file (PR #115045)

2024-11-07 Thread Chris B via cfe-commits
llvm-beanz wrote: > Correct, I'll edit the spec to reflect this more clearly. I've removed most > of the struct tests. I don't think that solves this problem. The code as implemented doesn't match what it should be doing. You shouldn't need to build the flattened type list if only vectors and

<    1   2   3   4   5   >