[clang] [llvm] [RFC][BPF] Do atomic_fetch_*() pattern matching with memory ordering (PR #107343)

2024-09-10 Thread via cfe-commits
yonghong-song wrote: For > I agree with these changes, could you please also add tests? Sure. Will do. https://github.com/llvm/llvm-project/pull/107343 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] Reapply "[Clang][CWG1815] Support lifetime extension of temporary created by aggregate initialization using a default member initializer" (PR #108039)

2024-09-10 Thread via cfe-commits
https://github.com/yronglin created https://github.com/llvm/llvm-project/pull/108039 The PR reapply https://github.com/llvm/llvm-project/pull/97308. Implement [CWG1815](https://wg21.link/CWG1815): Support lifetime extension of temporary created by aggregate initialization using a default memb

[clang] Reapply "[Clang][CWG1815] Support lifetime extension of temporary created by aggregate initialization using a default member initializer" (PR #108039)

2024-09-10 Thread via cfe-commits
https://github.com/yronglin edited https://github.com/llvm/llvm-project/pull/108039 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reapply "[Clang][CWG1815] Support lifetime extension of temporary created by aggregate initialization using a default member initializer" (PR #108039)

2024-09-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (yronglin) Changes The PR reapply https://github.com/llvm/llvm-project/pull/97308. Implement [CWG1815](https://wg21.link/CWG1815): Support lifetime extension of temporary created by aggregate initialization using a default member i

[clang] [clang-tools-extra] [llvm] [clang] WIP: Improved Context Declaration tracking (PR #107942)

2024-09-10 Thread Younan Zhang via cfe-commits
@@ -6291,7 +6307,8 @@ bool Parser::isDeclarationSpecifier( bool Parser::isConstructorDeclarator(bool IsUnqualified, bool DeductionGuide, DeclSpec::FriendSpecified IsFriend, const ParsedTemplateInfo *Templ

[clang] [clang-tools-extra] [llvm] [clang] WIP: Improved Context Declaration tracking (PR #107942)

2024-09-10 Thread Younan Zhang via cfe-commits
@@ -19998,9 +20054,9 @@ bool Sema::DiagIfReachable(SourceLocation Loc, ArrayRef Stmts, // static data member is not syntactically a constant evaluated constant, // but nonetheless is always required to be a constant expression, so we // can skip diagnosing. - // FIXME:

[clang] [clang-tools-extra] [llvm] [clang] WIP: Improved Context Declaration tracking (PR #107942)

2024-09-10 Thread Younan Zhang via cfe-commits
@@ -18770,12 +18832,6 @@ bool Sema::tryCaptureVariable( if (CapturingFunctionScopes == 0 && (!BuildAndDiagnose || VarDC == DC)) return true; - // Exception: Function parameters are not tied to the function's DeclContext - // until we enter the function definition. Capt

[clang] [clang-tools-extra] [llvm] [clang] WIP: Improved Context Declaration tracking (PR #107942)

2024-09-10 Thread Younan Zhang via cfe-commits
@@ -19000,7 +19056,7 @@ bool Sema::tryCaptureVariable( Explicit = false; FunctionScopesIndex--; if (IsInScopeDeclarationContext) - DC = ParentDC; + DC = skipRequiresBody(ParentDC); zyn0217 wrote: Hmm, do you have a test for it? e.g. the r

[clang] [clang-tools-extra] [llvm] [clang] WIP: Improved Context Declaration tracking (PR #107942)

2024-09-10 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 commented: Thanks. Just some thoughts/questions in my mind, and I may need more time to understand the PR. https://github.com/llvm/llvm-project/pull/107942 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang] [clang-tools-extra] [llvm] [clang] WIP: Improved Context Declaration tracking (PR #107942)

2024-09-10 Thread Younan Zhang via cfe-commits
@@ -961,6 +961,7 @@ static const Expr *SubstituteConstraintExpressionWithoutSatisfaction( if (MLTAL.getNumSubstitutedLevels() == 0) return ConstrExpr; + MLTAL.setKind(TemplateSubstitutionKind::Rewrite); zyn0217 wrote: I presume this avoids creating Su

[clang] [clang-tools-extra] [llvm] [clang] WIP: Improved Context Declaration tracking (PR #107942)

2024-09-10 Thread Younan Zhang via cfe-commits
@@ -15257,6 +15264,13 @@ Sema::ActOnStartOfFunctionDef(Scope *FnBodyScope, Declarator &D, D.setFunctionDefinitionKind(FunctionDefinitionKind::Definition); Decl *DP = HandleDeclarator(ParentScope, D, TemplateParameterLists); + if (auto *D = DP) { +if (auto *TD = dyn_c

[clang] [NFC] Move warning from CodeGen to Sema. (PR #107397)

2024-09-10 Thread Zahira Ammarguellat via cfe-commits
@@ -6784,6 +6784,10 @@ def warn_arc_lifetime_result_type : Warning< "ARC %select{unused|__unsafe_unretained|__strong|__weak|__autoreleasing}0 " "lifetime qualifier on return type is ignored">, InGroup; +def warn_next_larger_fp_type_same_size_than_fp : Warning< + "higher

[clang] [clang-tools-extra] [llvm] [clang] WIP: Improved Context Declaration tracking (PR #107942)

2024-09-10 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 edited https://github.com/llvm/llvm-project/pull/107942 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [llvm] [clang] WIP: Improved Context Declaration tracking (PR #107942)

2024-09-10 Thread Younan Zhang via cfe-commits
@@ -254,6 +254,33 @@ class CXXBaseSpecifier { TypeSourceInfo *getTypeSourceInfo() const { return BaseTypeInfo; } }; +class ContextDeclOrSentinel { + uintptr_t Pointer; + +public: + ContextDeclOrSentinel(Decl *Pointer) : Pointer(uintptr_t(Pointer)) {} + explicit ContextDec

[clang] [clang-tools-extra] [llvm] [clang] WIP: Improved Context Declaration tracking (PR #107942)

2024-09-10 Thread Younan Zhang via cfe-commits
@@ -18750,18 +18809,21 @@ static void buildLambdaCaptureFixit(Sema &Sema, LambdaScopeInfo *LSI, } } +static auto skipRequiresBody(DeclContext *DC) { + while (DC->isRequiresExprBody()) +DC = DC->getParent(); + return DC; +} + zyn0217 wrote: We could m

[clang] [RFC][C++20][Modules] Fix crash when function and lambda inside loaded from different modules (PR #104512)

2024-09-10 Thread Dmitry Polukhin via cfe-commits
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?=,Kyungwoo Lee ,Dmitry Polukhin ,Dmitry Polukhin Message-ID: In-Reply-To: https://github.com/dmpolukhin edited https://github.com/llvm/llvm-project/pull/104512 ___ cfe-commits mailing list cfe-commits@lis

[clang] [Clang][HIP] Target-dependent overload resolution in declarators and specifiers (PR #103031)

2024-09-10 Thread Fabian Ritter via cfe-commits
@@ -0,0 +1,703 @@ +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fsyntax-only -verify=expected,onhost %s +// RUN: %clang_cc1 -triple nvptx64-nvidia-cuda -fsyntax-only -fcuda-is-device -verify=expected,ondevice %s + + +// Tests to ensure that functions with host and device

[clang] [clang-tools-extra] [llvm] [clang] WIP: Improved Context Declaration tracking (PR #107942)

2024-09-10 Thread Younan Zhang via cfe-commits
@@ -961,6 +961,7 @@ static const Expr *SubstituteConstraintExpressionWithoutSatisfaction( if (MLTAL.getNumSubstitutedLevels() == 0) return ConstrExpr; + MLTAL.setKind(TemplateSubstitutionKind::Rewrite); zyn0217 wrote: I remember I had tried using Rewr

[clang] [RFC][C++20][Modules] Fix crash when function and lambda inside loaded from different modules (PR #104512)

2024-09-10 Thread Dmitry Polukhin via cfe-commits
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?=,Kyungwoo Lee ,Dmitry Polukhin ,Dmitry Polukhin Message-ID: In-Reply-To: https://github.com/dmpolukhin closed https://github.com/llvm/llvm-project/pull/104512 ___ cfe-commits mailing list cfe-commits@lis

[clang] d778689 - [RFC][C++20][Modules] Fix crash when function and lambda inside loaded from different modules (#104512)

2024-09-10 Thread via cfe-commits
Author: Dmitry Polukhin Date: 2024-09-10T16:15:50+01:00 New Revision: d778689fdc812033e7142ed87e4ee13c4997b3f9 URL: https://github.com/llvm/llvm-project/commit/d778689fdc812033e7142ed87e4ee13c4997b3f9 DIFF: https://github.com/llvm/llvm-project/commit/d778689fdc812033e7142ed87e4ee13c4997b3f9.dif

[clang] [clang-tools-extra] [llvm] [clang] WIP: Improved Context Declaration tracking (PR #107942)

2024-09-10 Thread Younan Zhang via cfe-commits
@@ -254,6 +254,33 @@ class CXXBaseSpecifier { TypeSourceInfo *getTypeSourceInfo() const { return BaseTypeInfo; } }; +class ContextDeclOrSentinel { + uintptr_t Pointer; + +public: + ContextDeclOrSentinel(Decl *Pointer) : Pointer(uintptr_t(Pointer)) {} + explicit ContextDec

[clang] [RFC][C++20][Modules] Fix crash when function and lambda inside loaded from different modules (PR #104512)

2024-09-10 Thread Dmitry Polukhin via cfe-commits
Valentin Clement =?utf-8?b?KOODkOODrOODsw=?=,Kyungwoo Lee ,Dmitry Polukhin ,Dmitry Polukhin Message-ID: In-Reply-To: dmpolukhin wrote: @ChuanqiXu9 thank you a lot for the review and help with the changes, very appreciated! https://github.com/llvm/llvm-project/pull/104512 _

[clang] [compiler-rt] [llvm] [X86] AMD Zen 5 Initial enablement (PR #107964)

2024-09-10 Thread Simon Pilgrim via cfe-commits
RKSimon wrote: @ganeshgit Can you address the clang-format warnings please? https://github.com/llvm/llvm-project/pull/107964 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [SPIR-V] Add SPIR-V structurizer (PR #107408)

2024-09-10 Thread Nathan Gauër via cfe-commits
Keenuts wrote: Given the ongoing discussion around spirv-sim, I updated all the hlsl tests to be llvm-ir -> SPIR-V tests. All tests now use both FileCheck and spirv-sim. https://github.com/llvm/llvm-project/pull/107408 ___ cfe-commits mailing list cf

[clang] Adding `asuint` implementation to hlsl (PR #107292)

2024-09-10 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/107292 >From a88a4eda4ce2ad32ee2ec02549b25c9f08aa14e9 Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Tue, 3 Sep 2024 19:06:22 + Subject: [PATCH 1/4] Adding `asuint` implementation to hlsl --- clang/includ

[clang] [Clang] Check features of tune CPU against target CPU (PR #68861)

2024-09-10 Thread Qiu Chaofan via cfe-commits
ecnelises wrote: @llvm/pr-subscribers-backend-powerpc https://github.com/llvm/llvm-project/pull/68861 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HIP][Clang][CodeGen] Handle hip bin symbols properly. (PR #107458)

2024-09-10 Thread Yaxun Liu via cfe-commits
@@ -905,10 +907,10 @@ llvm::Function *CGNVCUDARuntime::makeModuleCtorFunction() { GpuBinaryHandle = new llvm::GlobalVariable( TheModule, PtrTy, /*isConstant=*/false, Linkage, /*Initializer=*/ -CudaGpuBinary ? llvm::ConstantPointerNull::get(PtrTy) :

[clang] [HIP][Clang][CodeGen] Handle hip bin symbols properly. (PR #107458)

2024-09-10 Thread Yaxun Liu via cfe-commits
@@ -30,8 +28,6 @@ // RUN: 2>&1 | FileCheck -check-prefix=LD-R %s // LD-R: Found undefined HIP fatbin symbol: __hip_fatbin_[[ID1:[0-9a-f]+]] // LD-R: Found undefined HIP fatbin symbol: __hip_fatbin_[[ID2:[0-9a-f]+]] -// LD-R: Found undefined HIP gpubin handle symbol: __hip_gpu

[clang] [HIP][Clang][CodeGen] Handle hip bin symbols properly. (PR #107458)

2024-09-10 Thread Yaxun Liu via cfe-commits
@@ -175,7 +175,6 @@ __device__ void device_use() { // HIP-SAME: section ".hipFatBinSegment" // * variable to save GPU binary handle after initialization // CUDANORDC: @__[[PREFIX]]_gpubin_handle = internal global ptr null -// HIPNEF: @__[[PREFIX]]_gpubin_handle_{{[0-9a-f]+}} =

[clang] [llvm] [Clang][LLVM][AArch64] Add intrinsic for LUTI4 SME2 instruction (PR #97755)

2024-09-10 Thread via cfe-commits
@@ -350,3 +350,8 @@ void test_svdot_multi_za32_bad_lane(uint32_t slice_base, svuint16_t z_u16, svsudot_lane_za32_s8_vg1x2(slice_base, z_s8x2, z_u8, 4); // expected-error {{argument value 4 is outside the valid range [0, 3]}} svsudot_lane_za32_s8_vg1x4(slice_base, z_s8x4, z

[clang] [llvm] [Clang][LLVM][AArch64] Add intrinsic for LUTI4 SME2 instruction (PR #97755)

2024-09-10 Thread via cfe-commits
https://github.com/SpencerAbson edited https://github.com/llvm/llvm-project/pull/97755 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][LLVM][AArch64] Add intrinsic for LUTI4 SME2 instruction (PR #97755)

2024-09-10 Thread via cfe-commits
https://github.com/SpencerAbson approved this pull request. Thank you - just a few nits but it LGTM. https://github.com/llvm/llvm-project/pull/97755 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] [llvm] [Clang][LLVM][AArch64] Add intrinsic for LUTI4 SME2 instruction (PR #97755)

2024-09-10 Thread via cfe-commits
@@ -410,7 +410,7 @@ class AArch64DAGToDAGISel : public SelectionDAGISel { } void SelectMultiVectorLuti(SDNode *Node, unsigned NumOutVecs, unsigned Opc, - uint32_t MaxImm); + uint32_t MaxImm, bool IsMultiVector = false

[clang] [llvm] [Clang][LLVM][AArch64] Add intrinsic for LUTI4 SME2 instruction (PR #97755)

2024-09-10 Thread via cfe-commits
@@ -5415,6 +5423,11 @@ void AArch64DAGToDAGISel::Select(SDNode *Node) { SelectMultiVectorLuti(Node, 2, Opc, 3); return; } +case Intrinsic::aarch64_sme_luti4_zt_x4: { + // Does not have immediate but it has 2ZPR input + SelectMultiVectorLuti(Node,

[clang] [HIP][Clang][CodeGen] Handle hip bin symbols properly. (PR #107458)

2024-09-10 Thread Yaxun Liu via cfe-commits
@@ -905,10 +907,10 @@ llvm::Function *CGNVCUDARuntime::makeModuleCtorFunction() { GpuBinaryHandle = new llvm::GlobalVariable( TheModule, PtrTy, /*isConstant=*/false, Linkage, /*Initializer=*/ -CudaGpuBinary ? llvm::ConstantPointerNull::get(PtrTy) :

[clang] [HIP][Clang][CodeGen] Handle hip bin symbols properly. (PR #107458)

2024-09-10 Thread via cfe-commits
@@ -905,10 +907,10 @@ llvm::Function *CGNVCUDARuntime::makeModuleCtorFunction() { GpuBinaryHandle = new llvm::GlobalVariable( TheModule, PtrTy, /*isConstant=*/false, Linkage, /*Initializer=*/ -CudaGpuBinary ? llvm::ConstantPointerNull::get(PtrTy) :

[clang] [llvm] [NVPTX] Remove nvvm.bitcast.* intrinsics (PR #107936)

2024-09-10 Thread Justin Fargnoli via cfe-commits
justinfargnoli wrote: > can you point me to an analogous change I could use as an example? [[LLD] Add CLASS syntax to SECTIONS](https://github.com/llvm/llvm-project/commit/7e8a9020b1ae3dea28c19f0cd68743482dca13d9#diff-96d3595c06280d8c10f2687758a9e7bb5a0f3552fd53e552a1490411870c3500) [[LLVM] Add

[clang] Adding `asuint` implementation to hlsl (PR #107292)

2024-09-10 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/107292 >From a88a4eda4ce2ad32ee2ec02549b25c9f08aa14e9 Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Tue, 3 Sep 2024 19:06:22 + Subject: [PATCH 1/4] Adding `asuint` implementation to hlsl --- clang/includ

[clang] [clang][deps] Print tracing VFS data (PR #108056)

2024-09-10 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/108056 Clang's `-cc1 -print-stats` shows lots of useful internal data including basic `FileManager` stats. Since this layer caches some results, it is unclear how that information translates to actual filesystem

[clang] [clang][deps] Print tracing VFS data (PR #108056)

2024-09-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jan Svoboda (jansvoboda11) Changes Clang's `-cc1 -print-stats` shows lots of useful internal data including basic `FileManager` stats. Since this layer caches some results, it is unclear how that information translates to actual filesyste

[clang] Adding `asuint` implementation to hlsl (PR #107292)

2024-09-10 Thread Justin Bogner via cfe-commits
@@ -387,6 +387,65 @@ float3 asin(float3); _HLSL_BUILTIN_ALIAS(__builtin_elementwise_asin) float4 asin(float4); +//===--===// +// asuint builtins +//===--

[clang] [clang][deps] Print tracing VFS data (PR #108056)

2024-09-10 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan approved this pull request. LGTM with a comment. https://github.com/llvm/llvm-project/pull/108056 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][deps] Print tracing VFS data (PR #108056)

2024-09-10 Thread Steven Wu via cfe-commits
https://github.com/cachemeifyoucan edited https://github.com/llvm/llvm-project/pull/108056 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][deps] Print tracing VFS data (PR #108056)

2024-09-10 Thread Steven Wu via cfe-commits
@@ -1024,6 +1042,16 @@ int clang_scan_deps_main(int argc, char **argv, const llvm::ToolContext &) { Pool.wait(); } + if (Verbose) { +llvm::errs() << "\n*** Virtual File System Stats:\n" + << NumStatusCalls << " status() calls\n" + <<

[clang] Adding `asuint` implementation to hlsl (PR #107292)

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

[clang] [HLSL] Allow narrowing in initialization lists (PR #108035)

2024-09-10 Thread Justin Bogner via cfe-commits
bogner wrote: Can we test this? https://github.com/llvm/llvm-project/pull/108035 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Warn on duplicate is_rov attribute; remove unnecessary parentheses (PR #107973)

2024-09-10 Thread Helena Kotas via cfe-commits
@@ -8844,7 +8844,11 @@ static void processTypeAttrs(TypeProcessingState &state, QualType &type, } case ParsedAttr::AT_HLSLResourceClass: case ParsedAttr::AT_HLSLROV: { - if (state.getSema().HLSL().handleResourceTypeAttr(attr)) + // Only collect HLSL resou

[clang] [HLSL] Warn on duplicate is_rov attribute; remove unnecessary parentheses (PR #107973)

2024-09-10 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. It's a little awkward to do all three of these things together in one change, but it all looks simple and correct. https://github.com/llvm/llvm-project/pull/107973 ___ cfe-commits mailing list cfe-

[clang] [clang-tools-extra] [llvm] [clang] WIP: Improved Context Declaration tracking (PR #107942)

2024-09-10 Thread Matheus Izvekov via cfe-commits
@@ -6291,7 +6307,8 @@ bool Parser::isDeclarationSpecifier( bool Parser::isConstructorDeclarator(bool IsUnqualified, bool DeductionGuide, DeclSpec::FriendSpecified IsFriend, const ParsedTemplateInfo *Templ

[clang] [clang-tools-extra] [llvm] [clang] WIP: Improved Context Declaration tracking (PR #107942)

2024-09-10 Thread Matheus Izvekov via cfe-commits
@@ -254,6 +254,33 @@ class CXXBaseSpecifier { TypeSourceInfo *getTypeSourceInfo() const { return BaseTypeInfo; } }; +class ContextDeclOrSentinel { + uintptr_t Pointer; + +public: + ContextDeclOrSentinel(Decl *Pointer) : Pointer(uintptr_t(Pointer)) {} + explicit ContextDec

[clang] [clang-tools-extra] [llvm] [clang] WIP: Improved Context Declaration tracking (PR #107942)

2024-09-10 Thread Matheus Izvekov via cfe-commits
@@ -961,6 +961,7 @@ static const Expr *SubstituteConstraintExpressionWithoutSatisfaction( if (MLTAL.getNumSubstitutedLevels() == 0) return ConstrExpr; + MLTAL.setKind(TemplateSubstitutionKind::Rewrite); mizvekov wrote: The new difference introduced in

[clang] [clang-tools-extra] [llvm] [clang] WIP: Improved Context Declaration tracking (PR #107942)

2024-09-10 Thread Matheus Izvekov via cfe-commits
@@ -18770,12 +18832,6 @@ bool Sema::tryCaptureVariable( if (CapturingFunctionScopes == 0 && (!BuildAndDiagnose || VarDC == DC)) return true; - // Exception: Function parameters are not tied to the function's DeclContext - // until we enter the function definition. Capt

[clang] [HLSL] Warn on duplicate is_rov attribute; remove unnecessary parentheses (PR #107973)

2024-09-10 Thread Xiang Li via cfe-commits
https://github.com/python3kgae approved this pull request. https://github.com/llvm/llvm-project/pull/107973 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Adding `asuint` implementation to hlsl (PR #107292)

2024-09-10 Thread Farzon Lotfi via cfe-commits
@@ -387,6 +387,65 @@ float3 asin(float3); _HLSL_BUILTIN_ALIAS(__builtin_elementwise_asin) float4 asin(float4); +//===--===// +// asuint builtins +//===--

[clang] [clang-tools-extra] [llvm] [clang] WIP: Improved Context Declaration tracking (PR #107942)

2024-09-10 Thread Matheus Izvekov via cfe-commits
@@ -19000,7 +19056,7 @@ bool Sema::tryCaptureVariable( Explicit = false; FunctionScopesIndex--; if (IsInScopeDeclarationContext) - DC = ParentDC; + DC = skipRequiresBody(ParentDC); mizvekov wrote: That is one of your tests actually: `cla

[clang] [HIP][Clang][CodeGen] Handle hip bin symbols properly. (PR #107458)

2024-09-10 Thread via cfe-commits
https://github.com/jofrn updated https://github.com/llvm/llvm-project/pull/107458 >From d36c7e03866a7722c71c60d7e5f3e3c3ece24a60 Mon Sep 17 00:00:00 2001 From: jofernau Date: Tue, 10 Sep 2024 14:24:27 -0400 Subject: [PATCH] [HIP][Clang][CodeGen] Handle hip bin symbols properly. Remove '_' in f

[clang] [clang][dataflow] Only propagate past CXXDefaultInitExpr if init is (PR #99236)

2024-09-10 Thread Samira Bazuzi via cfe-commits
https://github.com/bazuzi closed https://github.com/llvm/llvm-project/pull/99236 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CGData] Clang Options (PR #90304)

2024-09-10 Thread Kyungwoo Lee via cfe-commits
https://github.com/kyulee-com updated https://github.com/llvm/llvm-project/pull/90304 >From 966922b9921669d48eb750c36ce3c9b792ba8161 Mon Sep 17 00:00:00 2001 From: Kyungwoo Lee Date: Fri, 26 Apr 2024 12:58:54 -0700 Subject: [PATCH] [CGData] Clang Optinos --- clang/include/clang/Driver/Options

[clang] [clang][bytecode] Add InitLinkScope for temporary variables (PR #106552)

2024-09-10 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > In this code: > > ```c++ > namespace ExplicitThisInTemporary { > struct B { B *p = this; }; > constexpr bool g(B b) { return &b == b.p; } > static_assert(g({}), ""); > } > ``` > > The AST for the `static_assert` expr is: > > ``` > CallExpr 0x5219ed98 '_Bool' > |-

[clang] [CGData] Clang Options (PR #90304)

2024-09-10 Thread Kyungwoo Lee via cfe-commits
https://github.com/kyulee-com edited https://github.com/llvm/llvm-project/pull/90304 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] prevent recovery call expression from proceeding with explicit attributes and undeclared templates (PR #107786)

2024-09-10 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/107786 >From b50e49be3765c31b1c555384c41e1f528d529a88 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Mon, 9 Sep 2024 02:30:35 +0300 Subject: [PATCH] [Clang] prevent recovery call expression from proceeding with e

[clang] [BPF] make __BPF_FEATURE_MAY_GOTO available for cpuv1 (PR #108071)

2024-09-10 Thread via cfe-commits
https://github.com/eddyz87 created https://github.com/llvm/llvm-project/pull/108071 For some reason `__BPF_FEATURE_MAY_GOTO` is available for CPUs v{2,3,4} but is not available for CPU v1. This limitation is arbitrary: - the instruction is never produced by LLVM backend; - on Linux Kernel side

[clang] [BPF] make __BPF_FEATURE_MAY_GOTO available for cpuv1 (PR #108071)

2024-09-10 Thread via cfe-commits
eddyz87 wrote: @yonghong-song, @4ast, As a cleanup, Yonghong suggested moving `__BPF_FEATURE_MAY_GOTO` macro so that it is available for CPUv1. (Although, I think it's better to move both `__BPF_FEATURE_MAY_GOTO` and `__BPF_FEATURE_ADDR_SPACE_CAST` down to CPUv4, as this would be more consiste

[clang] [BPF] make __BPF_FEATURE_MAY_GOTO available for cpuv1 (PR #108071)

2024-09-10 Thread via cfe-commits
https://github.com/eddyz87 ready_for_review https://github.com/llvm/llvm-project/pull/108071 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [BPF] make __BPF_FEATURE_MAY_GOTO available for cpuv1 (PR #108071)

2024-09-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (eddyz87) Changes For some reason `__BPF_FEATURE_MAY_GOTO` is available for CPUs v{2,3,4} but is not available for CPU v1. This limitation is arbitrary: - the instruction is never produced by LLVM backend; - on Linux Kernel side this

[clang] [lld] [llvm] [clang][MIPS] Add support for mipsel-windows-* targets (PR #107744)

2024-09-10 Thread via cfe-commits
=?utf-8?q?Hervé?= Poussineau , =?utf-8?q?Hervé?= Poussineau , =?utf-8?q?Hervé?= Poussineau , =?utf-8?q?Hervé?= Poussineau , =?utf-8?q?Hervé?= Poussineau , =?utf-8?q?Hervé?= Poussineau , =?utf-8?q?Hervé?= Poussineau , =?utf-8?q?Hervé?= Poussineau , =?utf-8?q?Hervé?= Poussineau , =?utf-8?q?Hervé?= Po

[clang] [llvm] [RFC][BPF] Do atomic_fetch_*() pattern matching with memory ordering (PR #107343)

2024-09-10 Thread via cfe-commits
@@ -1444,8 +1454,15 @@ void BTFDebug::processGlobals(bool ProcessingMapDef) { DIGlobal = GVE->getVariable(); if (SecName.starts_with(".maps")) visitMapDefType(DIGlobal->getType(), GVTypeId); - else -visitTypeEntry(DIGlobal->getType(), GVTypeId,

[clang] [clang-tools-extra] [libc] [libc][c11] implement ctime (PR #107285)

2024-09-10 Thread Michael Jones via cfe-commits
=?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw=?=, =?utf-8?b?0J

[clang] [clang-tools-extra] [libc] [libc][c11] implement ctime (PR #107285)

2024-09-10 Thread Michael Jones via cfe-commits
=?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw==?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw==?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw==?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw==?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw==?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw==?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw==?=, =?utf

[clang] [clang-tools-extra] [libc] [libc][c11] implement ctime (PR #107285)

2024-09-10 Thread Michael Jones via cfe-commits
=?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw==?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw==?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw==?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw==?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw==?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw==?=, =?utf-8?b?0JfQuNGI0LDQvSDQnNC40YDQtw==?=, =?utf

[clang] [llvm] [Clang] restrict use of attribute names reserved by the C++ standard (PR #106036)

2024-09-10 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: FWIW, LWG is still discussing the issue while trying to prioritize it, and it's got a reasonable amount of discussion on it. I think we should hold off making any changes or landing this patch until we have a better sense of whether LWG is going to refine this restriction o

[clang] Adding `asuint` implementation to hlsl (PR #107292)

2024-09-10 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/107292 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [BPF] make __BPF_FEATURE_MAY_GOTO available for cpuv1 (PR #108071)

2024-09-10 Thread via cfe-commits
4ast wrote: > @yonghong-song, @4ast, > > As a cleanup, Yonghong suggested moving `__BPF_FEATURE_MAY_GOTO` macro so > that it is available for CPUv1. (Although, I think it's better to move both > `__BPF_FEATURE_MAY_GOTO` and `__BPF_FEATURE_ADDR_SPACE_CAST` down to CPUv4, > as this would be mor

[clang] [HLSL] Add `[[hlsl::row_access]]` attribute (PR #107954)

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

[clang] [HLSL] Add `[[hlsl::row_access]]` attribute (PR #107954)

2024-09-10 Thread Justin Bogner via cfe-commits
@@ -6169,9 +6169,13 @@ class HLSLAttributedResourceType : public Type, public llvm::FoldingSetNode { // Data gathered from HLSL resource attributes llvm::dxil::ResourceClass ResourceClass; uint8_t IsROV : 1; -Attributes(llvm::dxil::ResourceClass ResourceClass,

[clang] [HLSL] Add `[[hlsl::row_access]]` attribute (PR #107954)

2024-09-10 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,16 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -o - %s -verify + +// expected-error@+1{{'row_access' attribute cannot be applied to a declaration}} +[[hlsl::row_access]] __hlsl_resource_t res0; + +// expected-error@+1{{HLSL resource needs to

[clang] [HLSL] Add `[[hlsl::row_access]]` attribute (PR #107954)

2024-09-10 Thread Justin Bogner via cfe-commits
@@ -6169,9 +6169,13 @@ class HLSLAttributedResourceType : public Type, public llvm::FoldingSetNode { // Data gathered from HLSL resource attributes llvm::dxil::ResourceClass ResourceClass; uint8_t IsROV : 1; -Attributes(llvm::dxil::ResourceClass ResourceClass,

[clang] [HLSL] Add `[[hlsl::row_access]]` attribute (PR #107954)

2024-09-10 Thread Xiang Li via cfe-commits
https://github.com/python3kgae approved this pull request. https://github.com/llvm/llvm-project/pull/107954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][TableGen] Migrate clang-tblgen to use const RecordKeeper (PR #107533)

2024-09-10 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Thank you for this! There's a fair amount of churn here as well as quite a few unrelated formatting changes. Would it be reasonable to split this up to make it a bit easier on reviewers? 0) Formatting changes (those are NFC and don't really require r

[clang] [clang][bytecode] Fix lookup of source locations in implicit ctors (PR #107992)

2024-09-10 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr edited https://github.com/llvm/llvm-project/pull/107992 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][TableGen] Migrate clang-tblgen to use const RecordKeeper (PR #107533)

2024-09-10 Thread Rahul Joshi via cfe-commits
jurahul wrote: Fair enough. The formatting changes are unintentional (I just happened to touch code that was not compliant and clang-format did its thing). How about I split these per-file/per-emitter/related sets of emitters? I have been doing the same on LLVM side, just that for clang it was

[clang] [BPF] make __BPF_FEATURE_MAY_GOTO available for cpuv1 (PR #108071)

2024-09-10 Thread via cfe-commits
https://github.com/eddyz87 updated https://github.com/llvm/llvm-project/pull/108071 >From 170f6a604b041bb33c5089dd84fd26de7bd2292e Mon Sep 17 00:00:00 2001 From: Eduard Zingerman Date: Tue, 10 Sep 2024 11:11:58 -0700 Subject: [PATCH 1/2] [BPF] make __BPF_FEATURE_MAY_GOTO available for cpuv1 Fo

[clang] [BPF] make __BPF_FEATURE_MAY_GOTO available for cpuv1 (PR #108071)

2024-09-10 Thread via cfe-commits
eddyz87 wrote: @4ast, > why force users to specify -mcpu=v4 ? may_goto and addr_cast are fine with v1. Ok, then this is exactly what this pull request does (allows may_goto for v1). https://github.com/llvm/llvm-project/pull/108071 ___ cfe-commits mai

[clang] [clang][TableGen] Migrate clang-tblgen to use const RecordKeeper (PR #107533)

2024-09-10 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > Fair enough. The formatting changes are unintentional (I just happened to > touch code that was not compliant and clang-format did its thing). How about > I split these per-file/per-emitter/related sets of emitters? I have been > doing the same on LLVM side, just that for

[clang] becb03f - [DirectX] Add DirectXTargetCodeGenInfo (#104856)

2024-09-10 Thread via cfe-commits
Author: Helena Kotas Date: 2024-09-10T12:41:08-07:00 New Revision: becb03f3c624a9570fdb3f2d5dee1ed75922e70b URL: https://github.com/llvm/llvm-project/commit/becb03f3c624a9570fdb3f2d5dee1ed75922e70b DIFF: https://github.com/llvm/llvm-project/commit/becb03f3c624a9570fdb3f2d5dee1ed75922e70b.diff

[clang] [llvm] [DirectX] Add DirectXTargetCodeGenInfo (PR #104856)

2024-09-10 Thread Helena Kotas via cfe-commits
https://github.com/hekota closed https://github.com/llvm/llvm-project/pull/104856 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [Clang] Add __type_list_dedup builtin to deduplicate types in template arguments (PR #106730)

2024-09-10 Thread Richard Smith via cfe-commits
https://github.com/zygoloid edited https://github.com/llvm/llvm-project/pull/106730 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [Clang] Add __type_list_dedup builtin to deduplicate types in template arguments (PR #106730)

2024-09-10 Thread Richard Smith via cfe-commits
https://github.com/zygoloid commented: This approach makes sense to me. I'd intended that `__type_pack_element` would be the start of a family of builtin templates operating on packs, but sadly didn't get very far down that road. https://github.com/llvm/llvm-project/pull/106730 ___

[clang] [clang-tools-extra] [Clang] Add __type_list_dedup builtin to deduplicate types in template arguments (PR #106730)

2024-09-10 Thread Richard Smith via cfe-commits
@@ -309,7 +309,10 @@ enum BuiltinTemplateKind : int { BTK__make_integer_seq, /// This names the __type_pack_element BuiltinTemplateDecl. - BTK__type_pack_element + BTK__type_pack_element, + + /// This names the __type_list_dedup BuiltinTemplateDecl. zyg

[clang] [clang-tools-extra] [Clang] Add __type_list_dedup builtin to deduplicate types in template arguments (PR #106730)

2024-09-10 Thread Richard Smith via cfe-commits
@@ -0,0 +1,57 @@ +// RUN: %clang_cc1 %s -verify zygoloid wrote: I'd like to also see some testing of the case where the template arguments have different sugar but are canonically the same, and when they differ by only cv-qualifiers. Those seem like likely case

[clang] [clang-tools-extra] [Clang] Add __type_list_dedup builtin to deduplicate types in template arguments (PR #106730)

2024-09-10 Thread Richard Smith via cfe-commits
@@ -309,7 +309,10 @@ enum BuiltinTemplateKind : int { BTK__make_integer_seq, /// This names the __type_pack_element BuiltinTemplateDecl. - BTK__type_pack_element + BTK__type_pack_element, + + /// This names the __type_list_dedup BuiltinTemplateDecl. + BTK__type_list_de

[clang] [clang-tools-extra] [Clang] Add __type_list_dedup builtin to deduplicate types in template arguments (PR #106730)

2024-09-10 Thread Richard Smith via cfe-commits
@@ -3158,6 +3161,33 @@ checkBuiltinTemplateIdType(Sema &SemaRef, BuiltinTemplateDecl *BTD, int64_t N = Index.getExtValue(); return Ts.getPackAsArray()[N].getAsType(); } + case BTK__type_list_dedup: { +assert(Converted.size() == 2 && + "__type_list_dedu

[clang-tools-extra] [llvm] Full path names are used in several unittests instead of the binary name. Fix up the testcase failures (PR #107974)

2024-09-10 Thread Matthias Braun via cfe-commits
MatzeB wrote: Please provide additional context in your summary on how this happens. My understanding is that this is for a setup with linux binfmt-misc + qemu running aarch64 binaries on an x86 system. The fact that we end up with absolute pathnames in `argv[0]` may be a bug in qemu or binfmt

[clang-tools-extra] [llvm] Full path names are used in several unittests instead of the binary name. Fix up the testcase failures (PR #107974)

2024-09-10 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB approved this pull request. https://github.com/llvm/llvm-project/pull/107974 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 61372fc - [HLSL] Warn on duplicate is_rov attribute; remove unnecessary parentheses (#107973)

2024-09-10 Thread via cfe-commits
Author: Helena Kotas Date: 2024-09-10T12:52:02-07:00 New Revision: 61372fc5db9b14fd612be8a58a76edd7f0ee38aa URL: https://github.com/llvm/llvm-project/commit/61372fc5db9b14fd612be8a58a76edd7f0ee38aa DIFF: https://github.com/llvm/llvm-project/commit/61372fc5db9b14fd612be8a58a76edd7f0ee38aa.diff

[clang] [HLSL] Warn on duplicate is_rov attribute; remove unnecessary parentheses (PR #107973)

2024-09-10 Thread Helena Kotas via cfe-commits
https://github.com/hekota closed https://github.com/llvm/llvm-project/pull/107973 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] prevent recovery call expression from proceeding with explicit attributes and undeclared templates (PR #107786)

2024-09-10 Thread Oleksandr T. via cfe-commits
a-tarasyuk wrote: @AaronBallman could you please review this fix? thanks https://github.com/llvm/llvm-project/pull/107786 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] set alwaysinline on HLSL functions (PR #106588)

2024-09-10 Thread Greg Roth via cfe-commits
@@ -2471,11 +2471,14 @@ void CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D, B.addAttribute(llvm::Attribute::StackProtectReq); if (!D) { +// HLSL functions must always be inlined +if (getLangOpts().HLSL && !F->hasFnAttribute("hlsl.shader"))

[clang] [HIP][Clang][CodeGen] Handle hip bin symbols properly. (PR #107458)

2024-09-10 Thread via cfe-commits
https://github.com/jofrn updated https://github.com/llvm/llvm-project/pull/107458 >From df6f79b7c969ac060b17cd0b0dd177749cc739bd Mon Sep 17 00:00:00 2001 From: jofernau Date: Tue, 10 Sep 2024 14:24:27 -0400 Subject: [PATCH] [HIP][Clang][CodeGen] Handle hip bin symbols properly. Remove '_' in f

[clang] [TBAA] Emit "omnipotent char" for intrinsics with type cast (PR #107793)

2024-09-10 Thread Paul Walker via cfe-commits
paulwalker-arm wrote: I'll need to look to see if the TBAA metadata we're adding matches what we initially envisaged but my gut feeling matches @arsenm. I'm assuming the original code emitted an error, something along the lines of "no version of svst1 available for long long*", which you've "f

<    1   2   3   4   >