[clang] [clang][bytecode] Implement integral-to-fixed-point casts (PR #110350)

2024-09-27 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/110350 None >From 164521d666e573789b720d457c6c42809224e905 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 27 Sep 2024 20:24:52 +0200 Subject: [PATCH] [clang][bytecode] Implement integral-to-f

[clang] [clang][bytecode] Implement integral-to-fixed-point casts (PR #110350)

2024-09-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/110350.diff 5 Files Affected: - (modified) clang/lib/AST/ByteCode/Compiler.cpp (+11) - (modified) clang/lib/AST/ByteCode/FixedPoint.h (+2-1) - (m

[clang] [llvm] Adding splitdouble HLSL function (PR #109331)

2024-09-27 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/109331 >From ef969c536d700a8585f0892952fae49cdd9c42d1 Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Thu, 19 Sep 2024 00:13:51 + Subject: [PATCH 1/9] Codegen builtin --- clang/include/clang/Basic/Builtins.

[clang] [llvm] Adding splitdouble HLSL function (PR #109331)

2024-09-27 Thread via cfe-commits
@@ -85,4 +85,9 @@ def int_dx_rsqrt : DefaultAttrsIntrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>] def int_dx_wave_is_first_lane : DefaultAttrsIntrinsic<[llvm_i1_ty], [], [IntrConvergent]>; def int_dx_sign : DefaultAttrsIntrinsic<[LLVMScalarOrSameVectorWidth<0, llvm_i32_ty>],

[clang] [llvm] Adding splitdouble HLSL function (PR #109331)

2024-09-27 Thread via cfe-commits
@@ -3,12 +3,12 @@ // Supported targets // -// RUN: %clang -target dxil-unknown-shadermodel6.2-compute %s -S -o /dev/null 2>&1 | FileCheck --allow-empty --check-prefix=CHECK-VALID %s -// RUN: %clang -target spirv-unknown-vulkan-compute %s -S -o /dev/null 2>&1 | FileCheck --al

[clang] [llvm] Adding splitdouble HLSL function (PR #109331)

2024-09-27 Thread Chris B via cfe-commits
https://github.com/llvm-beanz requested changes to this pull request. I have concerns about a few aspects of this change. @joaosaffran, let's sync up on Monday. https://github.com/llvm/llvm-project/pull/109331 ___ cfe-commits mailing list cfe-commits@

[clang] [llvm] Adding splitdouble HLSL function (PR #109331)

2024-09-27 Thread Chris B via cfe-commits
@@ -3,12 +3,12 @@ // Supported targets // -// RUN: %clang -target dxil-unknown-shadermodel6.2-compute %s -S -o /dev/null 2>&1 | FileCheck --allow-empty --check-prefix=CHECK-VALID %s -// RUN: %clang -target spirv-unknown-vulkan-compute %s -S -o /dev/null 2>&1 | FileCheck --al

[clang] [llvm] Adding splitdouble HLSL function (PR #109331)

2024-09-27 Thread Chris B via cfe-commits
@@ -6,6 +6,10 @@ uint4 test_asuint_too_many_arg(float p0, float p1) { // expected-error@-1 {{no matching function for call to 'asuint'}} // expected-note@hlsl/hlsl_intrinsics.h:* {{candidate function template not viable: requires single argument 'V', but 2 arguments were pr

[clang] [llvm] Adding splitdouble HLSL function (PR #109331)

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

[clang] [llvm] Adding splitdouble HLSL function (PR #109331)

2024-09-27 Thread Farzon Lotfi via cfe-commits
@@ -422,6 +422,55 @@ template constexpr uint asuint(T F) { return __detail::bit_cast(F); } +//===--===// +// asuint splitdouble builtins +//===---

[clang] [llvm] Adding splitdouble HLSL function (PR #109331)

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

[clang] [llvm] Adding splitdouble HLSL function (PR #109331)

2024-09-27 Thread Farzon Lotfi via cfe-commits
@@ -85,4 +85,9 @@ def int_dx_rsqrt : DefaultAttrsIntrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>] def int_dx_wave_is_first_lane : DefaultAttrsIntrinsic<[llvm_i1_ty], [], [IntrConvergent]>; def int_dx_sign : DefaultAttrsIntrinsic<[LLVMScalarOrSameVectorWidth<0, llvm_i32_ty>],

[clang] [HLSL] Use HLSLToolChain for Vulkan (PR #110306)

2024-09-27 Thread Chris B via cfe-commits
https://github.com/llvm-beanz approved this pull request. https://github.com/llvm/llvm-project/pull/110306 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement resource directory headers for common GPU intrinsics (PR #110179)

2024-09-27 Thread Shilei Tian via cfe-commits
shiltian wrote: > I am wondering if it would be easier to provide generic builtins in clang and > just codegen them. I guess in that case we'd just upscale everything to > 64-bit and say "If you need the other one use the target specific version". I'm not sure if that's a good idea. For simple

[clang] [llvm] Adding splitdouble HLSL function (PR #109331)

2024-09-27 Thread Chris B via cfe-commits
@@ -422,6 +422,55 @@ template constexpr uint asuint(T F) { return __detail::bit_cast(F); } +//===--===// +// asuint splitdouble builtins +//===---

[clang] [HLSL] Use HLSLToolChain for Vulkan (PR #110306)

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

[clang] [HLSL] Vector Usual Arithmetic Conversions (PR #108659)

2024-09-27 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-x86_64-debian-dylib` running on `gribozavr4` while building `clang` at step 6 "test-build-unified-tree-check-clang". Full details are available at: https://lab.llvm.org/buildbot/#/builders/60/builds/8762 Here is the re

[clang] [HLSL] Vector Usual Arithmetic Conversions (PR #108659)

2024-09-27 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-x86_64-debian-fast` running on `gribozavr4` while building `clang` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/56/builds/8505 Here is the rele

[clang] [clang][test] add testing for the AST matcher reference (PR #110258)

2024-09-27 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-arm64-windows-msvc` running on `linaro-armv8-windows-msvc-04` while building `clang` at step 5 "ninja check 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/161/builds/2385 Here is the relev

[clang] [llvm] Adding splitdouble HLSL function (PR #109331)

2024-09-27 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/109331 >From 9adaad635c4252c377daba166ef5fa7eb022942d Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Thu, 19 Sep 2024 00:13:51 + Subject: [PATCH 1/8] Codegen builtin --- clang/include/clang/Basic/Builtins.

[clang] [cuda][HIP] `__constant__` should imply constant (PR #110182)

2024-09-27 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/110182 >From af1adfafaa09bc7992cf9aaf34a6121cf2d56d5b Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Thu, 26 Sep 2024 04:16:52 +0100 Subject: [PATCH 1/2] Mark globals as `constant` if they have been annotated with `_

[clang] [llvm] [cuda][HIP] `__constant__` should imply constant (PR #110182)

2024-09-27 Thread Alex Voicu via cfe-commits
AlexVlx wrote: I've extende the test under `Transforms/GlobalOpt/externally-initialized.ll` to also cover `constant`s / ensure they don't get CSEd. https://github.com/llvm/llvm-project/pull/110182 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[clang] [llvm] [cuda][HIP] `__constant__` should imply constant (PR #110182)

2024-09-27 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/110182 >From af1adfafaa09bc7992cf9aaf34a6121cf2d56d5b Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Thu, 26 Sep 2024 04:16:52 +0100 Subject: [PATCH 1/3] Mark globals as `constant` if they have been annotated with `_

[clang] [llvm] [CGData][ThinLTO] Global Outlining with Two-CodeGen Rounds (PR #90933)

2024-09-27 Thread Teresa Johnson via cfe-commits
teresajohnson wrote: > > @teresajohnson Do you have any concern or comment on this direction? > > Just a quick reply to say that I am taking a look today (unfamiliar with this > approach so need to read through the RFC etc) and will get back later today Sorry I was obviously over optimistic on

[clang] [llvm] OpenMP offload 'simd' directive (PR #91261)

2024-09-27 Thread Johannes Doerfert via cfe-commits
@@ -164,9 +164,57 @@ uint32_t roundToWarpsize(uint32_t s) { uint32_t kmpcMin(uint32_t x, uint32_t y) { return x < y ? x : y; } +static int32_t nvptx_simd_reduce_nowait(void *reduce_data, +ShuffleReductFnTy shflFct, +

[clang] [llvm] OpenMP offload 'simd' directive (PR #91261)

2024-09-27 Thread Johannes Doerfert via cfe-commits
@@ -287,7 +303,7 @@ __kmpc_parallel_51(IdentTy *ident, int32_t, int32_t if_expr, // Set to true for workers participating in the parallel region. uint32_t TId = mapping::getThreadIdInBlock(); - bool ThreadIsActive = TId < state::getEffectivePTeamSize(); + bool ThreadIsAc

[clang] [llvm] OpenMP offload 'simd' directive (PR #91261)

2024-09-27 Thread Johannes Doerfert via cfe-commits
@@ -2974,10 +2974,8 @@ StmtResult Parser::ParseOpenMPDeclarativeOrExecutableDirective( Sema::CompoundScopeRAII Scope(Actions); AssociatedStmt = ParseStatement(); -if (AssociatedStmt.isUsable() && isOpenMPLoopDirective(DKind) && -getLangOpts

[clang] [llvm] OpenMP offload 'simd' directive (PR #91261)

2024-09-27 Thread Johannes Doerfert via cfe-commits
@@ -1210,12 +1211,16 @@ CallInst *CodeExtractor::emitCallAndSwitchStatement(Function *newFunction, if (ArgsInZeroAddressSpace && DL.getAllocaAddrSpace() != 0) { auto *StructSpaceCast = new AddrSpaceCastInst( - Struct, PointerType ::get(Context, 0), "structA

[clang] [llvm] OpenMP offload 'simd' directive (PR #91261)

2024-09-27 Thread Johannes Doerfert via cfe-commits
@@ -470,6 +484,11 @@ class OpenMPIRBuilder { /// all functions are finalized. void finalize(Function *Fn = nullptr); + CallInst *globalizeAlloca(AllocaInst *Alloca, SmallVector&); + void globalizeParallelVars(Function *CurFn); + SmallPtrSet

[clang] [llvm] OpenMP offload 'simd' directive (PR #91261)

2024-09-27 Thread Johannes Doerfert via cfe-commits
@@ -790,8 +794,167 @@ void OpenMPIRBuilder::finalize(Function *Fn) { "OMPIRBuilder finalization \n"; }; - if (!OffloadInfoManager.empty()) + if (!OffloadInfoManager.empty()) createOffloadEntriesAndInfoMetadata(ErrorReportFn); + + if (Config.EmitLLVMUse

[clang] [llvm] OpenMP offload 'simd' directive (PR #91261)

2024-09-27 Thread Johannes Doerfert via cfe-commits
@@ -1033,6 +1033,7 @@ static FieldDecl *addFieldToRecordDecl(ASTContext &C, DeclContext *DC, CGOpenMPRuntime::CGOpenMPRuntime(CodeGenModule &CGM) : CGM(CGM), OMPBuilder(CGM.getModule()) { + jdoerfert wrote: Cleanup the PR please. https://github.com/llvm

[clang] [llvm] OpenMP offload 'simd' directive (PR #91261)

2024-09-27 Thread Johannes Doerfert via cfe-commits
@@ -2824,155 +2829,78 @@ void CGOpenMPRuntimeGPU::emitReduction( return; } - assert((TeamsReduction || ParallelReduction) && - "Invalid reduction selection in emitReduction."); - - llvm::SmallDenseMap VarFieldMap; - llvm::SmallVector PrivatesReductions(Private

[clang] [llvm] OpenMP offload 'simd' directive (PR #91261)

2024-09-27 Thread Johannes Doerfert via cfe-commits
@@ -1402,6 +1402,7 @@ void CodeGenFunction::EmitOMPReductionClauseInit( } const auto *VD = cast(cast(TaskRedRef)->getDecl()); +llvm::dbgs() << "Emitting " << VD->getName() << " " << VD << "\n"; jdoerfert wrote: leftover, same as all the commented out

[clang] [llvm] OpenMP offload 'simd' directive (PR #91261)

2024-09-27 Thread Johannes Doerfert via cfe-commits
@@ -167,6 +167,9 @@ double omp_get_wtick(void); double omp_get_wtime(void); ///} + +int omp_get_simd_lane(void); jdoerfert wrote: ompx_, assuming this is not in the standard. https://github.com/llvm/llvm-project/pull/91261 ___

[clang] [llvm] OpenMP offload 'simd' directive (PR #91261)

2024-09-27 Thread Johannes Doerfert via cfe-commits
@@ -322,6 +322,40 @@ uint32_t mapping::getNumberOfProcessorElements() { return static_cast(config::getHardwareParallelism()); } +uint32_t mapping::getSimdLen() { + return 1; jdoerfert wrote: How does this work if it's always 1? https://github.com/llvm/llv

[clang] [llvm] OpenMP offload 'simd' directive (PR #91261)

2024-09-27 Thread Johannes Doerfert via cfe-commits
@@ -87,8 +87,10 @@ extern "C" { int32_t num_threads, void *fn, void **args, const int64_t nargs) { + //printf("SPMD mode\n")

[clang] [llvm] OpenMP offload 'simd' directive (PR #91261)

2024-09-27 Thread Johannes Doerfert via cfe-commits
@@ -336,13 +337,15 @@ class CheckVarsEscapingDeclContext final return; if (!D->hasAssociatedStmt()) return; + if (const auto *S = dyn_cast_or_null(D->getAssociatedStmt())) { // Do not analyze directives that do not actually require captu

[clang] [llvm] OpenMP offload 'simd' directive (PR #91261)

2024-09-27 Thread Johannes Doerfert via cfe-commits
@@ -105,6 +105,13 @@ uint32_t getMaxTeamThreads(bool IsSPMD); /// Return the number of processing elements on the device. uint32_t getNumberOfProcessorElements(); +uint32_t getSimdLen(); +uint32_t getSimdGroup(); +uint32_t getSimdLane(); +bool isSimdLeader(); +uint32_t getNumS

[clang] [llvm] OpenMP offload 'simd' directive (PR #91261)

2024-09-27 Thread Johannes Doerfert via cfe-commits
https://github.com/jdoerfert commented: There is too much unrelated stuff, printfs, commented code, etc. too review it properly. I left high-level comments, including why there is a hardcoded simdlen of 1 and globalization for all allocas. https://github.com/llvm/llvm-project/pull/91261 _

[clang] [llvm] OpenMP offload 'simd' directive (PR #91261)

2024-09-27 Thread Johannes Doerfert via cfe-commits
@@ -184,7 +196,7 @@ __kmpc_parallel_51(IdentTy *ident, int32_t, int32_t if_expr, // set, but they do not have individual ThreadStates yet. If they ever // modify the ICVs beyond this point a ThreadStates will be allocated. - bool IsActiveParallelRegion = NumThreads > 1; +

[clang] [llvm] OpenMP offload 'simd' directive (PR #91261)

2024-09-27 Thread Johannes Doerfert via cfe-commits
https://github.com/jdoerfert edited https://github.com/llvm/llvm-project/pull/91261 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][frontend] Add support for attribute plugins for statement attributes (PR #110334)

2024-09-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Eric Astor (ericastor) Changes We already have support for declaration attributes; this is just a matter of extending the plugin infrastructure to cover one more case. --- Full diff: https://github.com/llvm/llvm-project/pull/110334.diff

[clang] [clang][frontend] Add support for attribute plugins for statement attributes (PR #110334)

2024-09-27 Thread Eric Astor via cfe-commits
https://github.com/ericastor created https://github.com/llvm/llvm-project/pull/110334 We already have support for declaration attributes; this is just a matter of extending the plugin infrastructure to cover one more case. >From 0411b2939e10ca335e84731502126145509bef2d Mon Sep 17 00:00:00 2001

[clang] [clang][Sema] Bad register variable type error should point to the type (PR #110239)

2024-09-27 Thread David Spickett via cfe-commits
DavidSpickett wrote: I also think that "bad" is a confusing word to use here, "unsupported" would be better but I will address that in a follow up PR. https://github.com/llvm/llvm-project/pull/110239 ___ cfe-commits mailing list cfe-commits@lists.llvm

[clang] [clang][bytecode] Implement zero-init for fixed point types (PR #110257)

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

[clang] [llvm] [RISCV] Implement Clang Builtins for XCValu Extension in CV32E40P (PR #100684)

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

[clang] [ItaniumMangle] Use mangleType instead of mangleNameOrStandardSubstitution in mangleCXXCtorVTable function (PR #109970)

2024-09-27 Thread via cfe-commits
https://github.com/tcwzxx updated https://github.com/llvm/llvm-project/pull/109970 >From f9a25251087a160f2dc9e7f589aeb7b215bef60f Mon Sep 17 00:00:00 2001 From: tcwzxx Date: Wed, 25 Sep 2024 19:19:08 +0800 Subject: [PATCH 1/7] Rename mangleNameOrStandardSubstitution to mangleCXXRecordDecl and

[clang] [llvm] Implement operand bundles for floating-point operations (PR #109798)

2024-09-27 Thread Serge Pavlov via cfe-commits
@@ -4282,6 +4282,64 @@ static void upgradeDbgIntrinsicToDbgRecord(StringRef Name, CallBase *CI) { CI->getParent()->insertDbgRecordBefore(DR, CI->getIterator()); } +static CallBase *upgradeConstrainedIntrinsicCall(CallBase *CB, Function *F, +

[clang] [llvm] [DLCov 2/5] Implement DebugLoc coverage tracking (PR #107279)

2024-09-27 Thread J. Ryan Stinnett via cfe-commits
https://github.com/jryans approved this pull request. This part looks good to me, thanks for working on this! 😄 https://github.com/llvm/llvm-project/pull/107279 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mai

[libcxx] [libcxxabi] [libunwind] [libc++abi][libunwind] Run c++abi and unwind tests against a fake install root (PR #110171)

2024-09-27 Thread Louis Dionne via cfe-commits
https://github.com/ldionne updated https://github.com/llvm/llvm-project/pull/110171 >From f6c1590f9513ecab8fe0ea6db8b5367513ce95a1 Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Thu, 26 Sep 2024 17:09:32 -0400 Subject: [PATCH] [libc++abi][libunwind] Run c++abi and unwind tests against a fak

[clang] [clang][Sema] Bad register variable type error should point to the type (PR #110239)

2024-09-27 Thread David Spickett via cfe-commits
https://github.com/DavidSpickett created https://github.com/llvm/llvm-project/pull/110239 ...not the register keyword. Fixes #109776. Until now the error was only tested in clang/test/Sema/asm.c, where you can't check for the "^" character. I've added a new caret test file as I see has been d

[clang] [HLSL] Implement `asint` casting using `bit_cast` (PR #110027)

2024-09-27 Thread Finn Plummer via cfe-commits
inbelic wrote: Hm, the failing test-case is unrelated to these changes. But please let me know if action is required. https://github.com/llvm/llvm-project/pull/110027 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[clang] [HLSL] Make HLSLAttributedResourceType canonical and add code paths to convert HLSL types to DirectX target types (PR #110327)

2024-09-27 Thread Damyan Pepper via cfe-commits
@@ -4488,6 +4488,30 @@ void CXXNameMangler::mangleType(const ArrayParameterType *T) { mangleType(cast(T)); } +void CXXNameMangler::mangleType(const HLSLAttributedResourceType *T) { + mangleType(T->getWrappedType()); + const HLSLAttributedResourceType::Attributes &Attrs =

[clang] Reapply "[clang][CodeGen] Zero init unspecified fields in initializers in C" (#109898) (PR #110051)

2024-09-27 Thread via cfe-commits
@@ -1748,6 +1771,26 @@ void AggExprEmitter::VisitCXXParenListOrInitListExpr( CGF.getTypes().isZeroInitializable(ExprToVisit->getType())) break; +if (ZeroInitPadding) { + uint64_t StartBitOffset = Layout.getFieldOffset(field->getFieldIndex()); + Char

[clang] [HLSL] Make HLSLAttributedResourceType canonical and add code paths to convert HLSL types to DirectX target types (PR #110327)

2024-09-27 Thread Damyan Pepper via cfe-commits
@@ -29,19 +29,48 @@ class DirectXTargetCodeGenInfo : public TargetCodeGenInfo { llvm::Type *DirectXTargetCodeGenInfo::getHLSLType(CodeGenModule &CGM, const Type *Ty) const { - auto *BuiltinTy = dyn_cast(Ty); - if (!BuiltinTy

[clang] Reapply "[clang][CodeGen] Zero init unspecified fields in initializers in C" (#109898) (PR #110051)

2024-09-27 Thread via cfe-commits
https://github.com/yabinc updated https://github.com/llvm/llvm-project/pull/110051 >From 112b018d3cac542757fcc399efa9fa5a9caac9b8 Mon Sep 17 00:00:00 2001 From: Yabin Cui Date: Wed, 25 Sep 2024 10:05:27 -0700 Subject: [PATCH 1/2] Reapply "[clang][CodeGen] Zero init unspecified fields in initia

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

2024-09-27 Thread via cfe-commits
eddyz87 wrote: @yonghong-song , @uweigand , the fix is available in #110332 https://github.com/llvm/llvm-project/pull/107343 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement `asint` casting using `bit_cast` (PR #110027)

2024-09-27 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-aarch64-linux` running on `sanitizer-buildbot7` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/51/builds/4443 Here is the relevant piece of the

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

2024-09-27 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/107786 >From e9948a1004cc2b486a0422d83e88392754e9f7e9 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Mon, 23 Sep 2024 17:17:30 +0300 Subject: [PATCH 1/2] [Clang] prevent recovery call expression from proceeding w

[clang] [clang] Allow `pragma float_control(precise, *)` to... (PR #105912)

2024-09-27 Thread Andy Kaylor via cfe-commits
@@ -4210,26 +4210,45 @@ class AbstractConditionalOperator : public Expr { /// ConditionalOperator - The ?: ternary operator. The GNU "missing /// middle" extension is a BinaryConditionalOperator. -class ConditionalOperator : public AbstractConditionalOperator { +class Conditi

[clang] [flang] [flang][preprocessor] Don't expand INCLUDE under -E by default (PR #110333)

2024-09-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-flang-driver Author: Peter Klausler (klausler) Changes Fortran INCLUDE lines have (until now) been treated like #include directives. This isn't how things work with other Fortran compilers when running under the -E option fo

[clang] [flang] [flang][preprocessor] Don't expand INCLUDE under -E by default (PR #110333)

2024-09-27 Thread Peter Klausler via cfe-commits
https://github.com/klausler created https://github.com/llvm/llvm-project/pull/110333 Fortran INCLUDE lines have (until now) been treated like #include directives. This isn't how things work with other Fortran compilers when running under the -E option for preprocessing only, so stop doing it

[clang] [HLSL] Make HLSLAttributedResourceType canonical and add code paths to convert HLSL types to DirectX target types (PR #110327)

2024-09-27 Thread Damyan Pepper via cfe-commits
@@ -4488,6 +4488,30 @@ void CXXNameMangler::mangleType(const ArrayParameterType *T) { mangleType(cast(T)); } +void CXXNameMangler::mangleType(const HLSLAttributedResourceType *T) { + mangleType(T->getWrappedType()); + const HLSLAttributedResourceType::Attributes &Attrs =

[clang] [HLSL] Make HLSLAttributedResourceType canonical and add code paths to convert HLSL types to DirectX target types (PR #110327)

2024-09-27 Thread Damyan Pepper via cfe-commits
@@ -29,19 +29,48 @@ class DirectXTargetCodeGenInfo : public TargetCodeGenInfo { llvm::Type *DirectXTargetCodeGenInfo::getHLSLType(CodeGenModule &CGM, const Type *Ty) const { - auto *BuiltinTy = dyn_cast(Ty); - if (!BuiltinTy

[clang-tools-extra] [clang-tidy] Portability Template Virtual Member Function Check (PR #110099)

2024-09-27 Thread via cfe-commits
https://github.com/isuckatcs updated https://github.com/llvm/llvm-project/pull/110099 >From 9cdba3e947705053b14f8eeca39c281fd18e21ce Mon Sep 17 00:00:00 2001 From: isuckatcs <65320245+isucka...@users.noreply.github.com> Date: Thu, 26 Sep 2024 11:43:10 +0200 Subject: [PATCH 1/7] [clang-tidy] Port

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-27 Thread Richard Smith via cfe-commits
zygoloid wrote: I've filed a fmtlib bug: https://github.com/fmtlib/fmt/issues/4177 https://github.com/llvm/llvm-project/pull/109208 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement P2582R1: CTAD from inherited constructors (PR #98788)

2024-09-27 Thread Matheus Izvekov via cfe-commits
@@ -944,12 +950,72 @@ getRHSTemplateDeclAndArgs(Sema &SemaRef, TypeAliasTemplateDecl *AliasTemplate) { return {Template, AliasRhsTemplateArgs}; } +struct InheritedConstructorDeductionInfo { + // Class template for which we are declaring deduction guides + // This is `C` i

[clang] [llvm] [InstrPGO] Instrument sampling profile based cold function (PR #109837)

2024-09-27 Thread Lei Wang via cfe-commits
https://github.com/wlei-llvm edited https://github.com/llvm/llvm-project/pull/109837 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [InstrPGO] Instrument sampling profile based cold function (PR #110330)

2024-09-27 Thread Lei Wang via cfe-commits
https://github.com/wlei-llvm created https://github.com/llvm/llvm-project/pull/110330 None >From d660d3b9a043a3530a735c1b95790116f6366062 Mon Sep 17 00:00:00 2001 From: wlei Date: Sun, 22 Sep 2024 20:23:20 -0700 Subject: [PATCH 1/2] [InstrPGO] Instrument sampling profile based cold function

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-27 Thread Richard Smith via cfe-commits
zygoloid wrote: I found this: https://fuchsia.googlesource.com/third_party/github.com/fmtlib/fmt/+/refs/heads/upstream/main/include/fmt/base.h#2664 Note that this is passing `s` separately both to `parse_format_string` and to `checker`. Here, `s` is a lambda that implicitly converts to a strin

[clang] [llvm] [InstrPGO] Instrument sampling profile based cold function v2 (PR #110330)

2024-09-27 Thread Lei Wang via cfe-commits
https://github.com/wlei-llvm edited https://github.com/llvm/llvm-project/pull/110330 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implementation of the elementwise fmod builtin (PR #108849)

2024-09-27 Thread via cfe-commits
github-actions[bot] wrote: @lizhengxing Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a problem with a bu

[clang] [llvm] [InstrPGO] Instrument sampling profile based cold function v2 (PR #110330)

2024-09-27 Thread Lei Wang via cfe-commits
https://github.com/wlei-llvm edited https://github.com/llvm/llvm-project/pull/110330 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-27 Thread Richard Smith via cfe-commits
zygoloid wrote: That backtrace doesn't match the fmtlib code available from their official repository. Where can I find the code you're building? https://github.com/llvm/llvm-project/pull/109208 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][bytecode] Don't produce a null type when checking new exprs (PR #110252)

2024-09-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes getType() might give us the right type already, so use that instead of calling getPointeeType() for all CXXNewExprs. --- Full diff: https://github.com/llvm/llvm-project/pull/110252.diff 2 Files Affected:

[clang] [clang][bytecode] Start implementing fixed point types (PR #110216)

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

[clang] [HLSL] Implementation of the elementwise fmod builtin (PR #108849)

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

[clang] 5d08f32 - [HLSL] Implementation of the elementwise fmod builtin (#108849)

2024-09-27 Thread via cfe-commits
Author: Zhengxing li Date: 2024-09-27T17:26:06-04:00 New Revision: 5d08f3256b134e9c5414b4e50563e5de0f1735c6 URL: https://github.com/llvm/llvm-project/commit/5d08f3256b134e9c5414b4e50563e5de0f1735c6 DIFF: https://github.com/llvm/llvm-project/commit/5d08f3256b134e9c5414b4e50563e5de0f1735c6.diff

[clang] [HLSL] Implement `asint` casting using `bit_cast` (PR #110027)

2024-09-27 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl approved this pull request. https://github.com/llvm/llvm-project/pull/110027 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement `asint` casting using `bit_cast` (PR #110027)

2024-09-27 Thread Finn Plummer via cfe-commits
https://github.com/inbelic closed https://github.com/llvm/llvm-project/pull/110027 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e9700d0 - [HLSL] Implement `asint` casting using `bit_cast` (#110027)

2024-09-27 Thread via cfe-commits
Author: Finn Plummer Date: 2024-09-27T14:16:51-07:00 New Revision: e9700d03dd5b89ffc8ef77d0bac2ebc6228f894a URL: https://github.com/llvm/llvm-project/commit/e9700d03dd5b89ffc8ef77d0bac2ebc6228f894a DIFF: https://github.com/llvm/llvm-project/commit/e9700d03dd5b89ffc8ef77d0bac2ebc6228f894a.diff

[clang] [HLSL] Implementation of the elementwise fmod builtin (PR #108849)

2024-09-27 Thread Zhengxing li via cfe-commits
lizhengxing wrote: @farzonl Could you help to merge this PR? The 2 failing checks are in libc++ since yesterday. It might be caused by [#107638](https://github.com/llvm/llvm-project/pull/107638). @hekota pinged the authors of [#107638](https://github.com/llvm/llvm-project/pull/107638) to see

[clang] [llvm] Adding splitdouble HLSL function (PR #109331)

2024-09-27 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/109331 >From 9adaad635c4252c377daba166ef5fa7eb022942d Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Thu, 19 Sep 2024 00:13:51 + Subject: [PATCH 1/7] Codegen builtin --- clang/include/clang/Basic/Builtins.

[clang] [clang][analyzer] Move 'alpha.core.PointerSub' checker into 'security.PointerSub' (PR #107596)

2024-09-27 Thread Balazs Benics via cfe-commits
=?utf-8?q?Bal=C3=A1zs_K=C3=A9ri?= Message-ID: In-Reply-To: https://github.com/steakhal approved this pull request. Still makes sense. https://github.com/llvm/llvm-project/pull/107596 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[clang-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2024-09-27 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,489 @@ +//===-- Mustache.cpp --===// +// +// 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: Ap

[clang] [clang] implement current direction of CWG2765 for string literal comparisons in constant evaluation (PR #109208)

2024-09-27 Thread via cfe-commits
zeroomega wrote: Hi, We are seeing build error on fmtlib project after this patch is landed. The error message from the clang is: ``` FAILED: host_x64/obj/third_party/fmtlib/src/src/fmtlib.os.cc.o ../../prebuilt/third_party/clang/custom/bin/clang++ -MD -MF host_x64/obj/third_party/fmtlib/sr

[clang] [Clang] Implement resource directory headers for common GPU intrinsics (PR #110179)

2024-09-27 Thread Joseph Huber via cfe-commits
jhuber6 wrote: I am wondering if it would be easier to provide generic builtins in clang and just codegen them. I guess in that case we'd just upscale everything to 64-bit and say "If you need the other one use the target specific version". https://github.com/llvm/llvm-project/pull/110179

[clang] [Clang] Implement resource directory headers for common GPU intrinsics (PR #110179)

2024-09-27 Thread Johannes Doerfert via cfe-commits
@@ -0,0 +1,184 @@ +//===-- nvptxintrin.h - NVPTX intrinsic functions -===// +// +// 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: Ap

[clang] [HLSL] Make HLSLAttributedResourceType canonical and add code paths to convert HLSL types to DirectX target types (PR #110327)

2024-09-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-backend-directx Author: Helena Kotas (hekota) Changes Translates `RWBuffer` and `StructuredBuffer` resources buffer types to DirectX target types `dx.TypedBuffer` and `dx.RawBuffer`. Includes a change of `HLSLAttribut

[clang] [HLSL] Make HLSLAttributedResourceType canonical and add code paths to convert HLSL types to DirectX target types (PR #110327)

2024-09-27 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Helena Kotas (hekota) Changes Translates `RWBuffer` and `StructuredBuffer` resources buffer types to DirectX target types `dx.TypedBuffer` and `dx.RawBuffer`. Includes a change of `HLSLAttributesResourceType` from 'sugar' type to full ca

[clang] [HLSL] Make HLSLAttributedResourceType canonical and add code paths to convert HLSL types to DirectX target types (PR #110327)

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

[clang] [rtsan] Update docs to include run-time flags (PR #110296)

2024-09-27 Thread Florian Mayer via cfe-commits
https://github.com/fmayer approved this pull request. https://github.com/llvm/llvm-project/pull/110296 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2024-09-27 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,489 @@ +//===-- Mustache.cpp --===// +// +// 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: Ap

[clang-tools-extra] [llvm] [llvm] add support for mustache templating language (PR #105893)

2024-09-27 Thread Paul Kirth via cfe-commits
@@ -0,0 +1,489 @@ +//===-- Mustache.cpp --===// +// +// 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: Ap

[clang] f11775f - [libclang/python] Do not rely on `ctypes`' `errcheck` (#105490)

2024-09-27 Thread via cfe-commits
Author: Jannick Kremer Date: 2024-09-27T22:17:11+02:00 New Revision: f11775f0a2af66b33934fccc5a6566c462a8f6a0 URL: https://github.com/llvm/llvm-project/commit/f11775f0a2af66b33934fccc5a6566c462a8f6a0 DIFF: https://github.com/llvm/llvm-project/commit/f11775f0a2af66b33934fccc5a6566c462a8f6a0.diff

[clang] [Clang] Implement resource directory headers for common GPU intrinsics (PR #110179)

2024-09-27 Thread Joseph Huber via cfe-commits
@@ -0,0 +1,184 @@ +//===-- nvptxintrin.h - NVPTX intrinsic functions -===// +// +// 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: Ap

[clang] [Clang] Implement resource directory headers for common GPU intrinsics (PR #110179)

2024-09-27 Thread Johannes Doerfert via cfe-commits
@@ -0,0 +1,187 @@ +//===-- amdgpuintrin.h - AMDPGU intrinsic functions ---===// +// +// 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: Ap

[clang] c650067 - [NVPTX] Add a clang builtin for the `warpsize` intrinsic (#110316)

2024-09-27 Thread via cfe-commits
Author: Joseph Huber Date: 2024-09-27T13:52:44-07:00 New Revision: c6500671ed3352ce4f7fb1e0411b66e74a6ea3da URL: https://github.com/llvm/llvm-project/commit/c6500671ed3352ce4f7fb1e0411b66e74a6ea3da DIFF: https://github.com/llvm/llvm-project/commit/c6500671ed3352ce4f7fb1e0411b66e74a6ea3da.diff

[clang] [NVPTX] Add a clang builtin for the `warpsize` intrinsic (PR #110316)

2024-09-27 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 closed https://github.com/llvm/llvm-project/pull/110316 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [rtsan] Update docs to include run-time flags (PR #110296)

2024-09-27 Thread Chris Apple via cfe-commits
https://github.com/cjappl updated https://github.com/llvm/llvm-project/pull/110296 >From eb8712a4eb82495a84e593c375f787017380de40 Mon Sep 17 00:00:00 2001 From: Chris Apple Date: Fri, 27 Sep 2024 09:40:11 -0700 Subject: [PATCH 1/3] [rtsan] Update docs to include run-time flags --- clang/docs/

  1   2   3   4   5   >