[clang] [clang-tools-extra] [Clang] [C2y] Implement N3355 ‘NamedLoops’ (PR #152870)

2025-09-03 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/152870 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][SPIRV] Set program address space for Intel-flavored SPIR-V (PR #135251)

2025-09-03 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. Seems fine, though I do wonder what's the point of SPIR-V being generic if we hard-code behavior for different 'flavors' anyway. https://github.com/llvm/llvm-project/pull/135251 ___ cfe-commits ma

[clang] [Clang-Repl] Sinking RemoteJITUtils into Interpreter class(Refactoring) (PR #155140)

2025-09-03 Thread Vassil Vassilev via cfe-commits
@@ -62,8 +76,23 @@ class IncrementalExecutor { llvm::orc::LLJIT &GetExecutionEngine() { return *Jit; } +#ifndef _WIN32 + pid_t getOutOfProcessChildPid() const { return OutOfProcessChildPid; } +#endif vgvassilev wrote: ```suggestion pid_t getOutOfProcess

[clang] [AMDGPU][SPIRV] Use SPIR-V syncscopes for some AMDGCN BIs (PR #154867)

2025-09-03 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/154867 >From f65fa1deedae45ad8f3d007e39c914c091387be2 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Fri, 22 Aug 2025 01:02:42 +0100 Subject: [PATCH 1/3] Use "device" instead of "agent" and "subgroup" instead of "wav

[clang] [llvm] [NVPTX] Change the alloca address space in NVPTXLowerAlloca (PR #154814)

2025-09-03 Thread Theodoros Theodoridis via cfe-commits
@@ -1444,15 +1444,16 @@ void clang::emitBackendOutput(CompilerInstance &CI, CodeGenOptions &CGOpts, // Verify clang's TargetInfo DataLayout against the LLVM TargetMachine's // DataLayout. - if (AsmHelper.TM) { -std::string DLDesc = M->getDataLayout().getStringReprese

[clang] [Headers][X86] Allow AVX512 masked blend intrinsics to be used in constexpr (PR #156234)

2025-09-03 Thread Simon Pilgrim via cfe-commits
@@ -915,7 +948,14 @@ __m128i test_mm_mask_abs_epi8(__m128i __W, __mmask16 __U, __m128i __A) { // CHECK: select <16 x i1> %{{.*}}, <16 x i8> [[ABS]], <16 x i8> %{{.*}} return _mm_mask_abs_epi8(__W,__U,__A); } -TEST_CONSTEXPR(match_v16qi(_mm_mask_abs_epi8((__m128i)(__v16qi)

[clang] [Headers][X86] Allow AVX512 masked blend intrinsics to be used in constexpr (PR #156234)

2025-09-03 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon requested changes to this pull request. https://github.com/llvm/llvm-project/pull/156234 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][www] Documentation revision and proof read for features.html (PR #156620)

2025-09-03 Thread via cfe-commits
https://github.com/lknknm updated https://github.com/llvm/llvm-project/pull/156620 >From 10b4bcf3653c484652e9a832e613eb820530c34f Mon Sep 17 00:00:00 2001 From: Lucas <108239558+lkn...@users.noreply.github.com> Date: Mon, 1 Sep 2025 22:54:46 +0200 Subject: [PATCH 1/8] Fix: Change Reference to 'B

[clang] [CodeGen] Fix cleanup attribute for C89 for-loop init variables (PR #156643)

2025-09-03 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff origin/main HEAD --extensions cpp,h,c -- clang/lib/CodeGen/CGDecl.cpp clang/lib/CodeG

[clang] [clang][www] Documentation revision and proof read for features.html (PR #156620)

2025-09-03 Thread via cfe-commits
@@ -28,7 +28,7 @@ Clang - Features and Goals End-User Features: -Fast compiles and low memory use +Fast Compile-times and low memory use lknknm wrote: Sure! Just changed :) https://github.com/llvm/llvm-project/pull/156620 ___

[clang] [llvm] [InstCombine] Strip leading zero indices from GEP (PR #155415)

2025-09-03 Thread Jan Patrick Lehr via cfe-commits
jplehr wrote: Attached is the IR from pre codegen. Apologies that this may again not be what is needed. I always find the clang-linker-wrapper thing a bit confusing. So, I hope this helps and thanks for the time. [libc-gpu-precodegen.txt](https://github.com/user-attachments/files/22116762/libc-g

[clang] [clang][www] Documentation revision and proof read for features.html (PR #156620)

2025-09-03 Thread via cfe-commits
@@ -183,7 +183,7 @@ Library Based Architecture levels. -As an example of the power of this library based design If you wanted to +As some examples for the power of this library based design: If you wanted to lknknm wrote: Yes, mostly I just wante

[clang] [compiler-rt] [clang-repl] Reimplement value printing using MemoryAccess to support in-process and out-of-process (PR #156649)

2025-09-03 Thread via cfe-commits
https://github.com/SahilPatidar created https://github.com/llvm/llvm-project/pull/156649 Reimplement value printing on top of ORC MemoryAccess. The previous implementation only supported in-process evaluation; with this new design it now works in both in-process and out-of-process modes. The im

[clang] [compiler-rt] [clang-repl] Reimplement value printing using MemoryAccess to support in-process and out-of-process (PR #156649)

2025-09-03 Thread via cfe-commits
SahilPatidar wrote: @vgvassilev This is still a draft — some parts are not implemented yet (e.g. record and function types), but I shared it so you can see the idea and check if the approach looks feasible. https://github.com/llvm/llvm-project/pull/156649

[clang] [compiler-rt] [clang-repl] Reimplement value printing using MemoryAccess to support in-process and out-of-process (PR #156649)

2025-09-03 Thread via cfe-commits
SahilPatidar wrote: And also I need a way to detect whether the interpreter is running in-process or out-of-process. https://github.com/llvm/llvm-project/pull/156649 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang] [clang][www] Documentation revision and proof read for features.html (PR #156620)

2025-09-03 Thread via cfe-commits
https://github.com/lknknm updated https://github.com/llvm/llvm-project/pull/156620 >From 10b4bcf3653c484652e9a832e613eb820530c34f Mon Sep 17 00:00:00 2001 From: Lucas <108239558+lkn...@users.noreply.github.com> Date: Mon, 1 Sep 2025 22:54:46 +0200 Subject: [PATCH 01/10] Fix: Change Reference to

[clang] [clang][OpenMP] 6.0: detect privatization of array section/assumed-size array (PR #152786)

2025-09-03 Thread Alexey Bataev via cfe-commits
@@ -443,7 +443,8 @@ implementation. +-+---+---+--+ | Traits for default device envirable

[clang] [clang] Delay checking of `-fopenmp-host-ir-file-path` (PR #150124)

2025-09-03 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `ppc64le-flang-rhel-clang` running on `ppc64le-flang-rhel-test` while building `clang` at step 5 "build-unified-tree". Full details are available at: https://lab.llvm.org/buildbot/#/builders/157/builds/38662 Here is the rele

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-03 Thread Daniil Kovalev via cfe-commits
@@ -541,7 +588,33 @@ struct scan_results }; } // unnamed namespace +} // extern "C" + +namespace { +// The logical model for casting authenticated function pointers makes +// it impossible to directly cast them without breaking the authentication, +// as a result we need this

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-03 Thread Daniil Kovalev via cfe-commits
@@ -557,7 +596,19 @@ set_registers(_Unwind_Exception* unwind_exception, _Unwind_Context* context, reinterpret_cast(unwind_exception)); _Unwind_SetGR(context, __builtin_eh_return_data_regno(1), static_cast(results.ttypeIndex)); +#if defined(__A

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-03 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: Cannot add inline comment, so commenting on the whole file: `stepWithDwarf` function contains piece of logic for handling signed RA. This works properly for pac-ret, but it interferes with logic for ptrauth-returns which is a part of pauthtest

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-03 Thread Daniil Kovalev via cfe-commits
@@ -377,13 +395,32 @@ const char *CFI_Parser::parseCIE(A &addressSpace, pint_t cie, case 'z': cieInfo->fdesHaveAugmentationData = true; break; - case 'P': + case 'P': { cieInfo->personalityEncoding = addressSpace.get8(p); ++p;

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-03 Thread Daniil Kovalev via cfe-commits
@@ -103,6 +103,52 @@ #define _LIBCXXABI_DTOR_FUNC #endif +#if __has_include() +# include +#endif kovdan01 wrote: @ojhunt Can we get rid of `__has_include()` check here and switch to `__has_feature(ptrauth_calls) || defined(__PTRAUTH__)` just as a couple of

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-03 Thread Daniil Kovalev via cfe-commits
@@ -16,6 +16,12 @@ #include #endif +#if __has_feature(ptrauth_calls) || defined(__PTRAUTH__) kovdan01 wrote: It's probably worth submitting changes related to `__PTRAUTH__` introduced in #153912 as a separate PR while keeping this PR only focused on unwind

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-03 Thread Daniil Kovalev via cfe-commits
@@ -557,7 +630,21 @@ set_registers(_Unwind_Exception* unwind_exception, _Unwind_Context* context, reinterpret_cast(unwind_exception)); _Unwind_SetGR(context, __builtin_eh_return_data_regno(1), static_cast(results.ttypeIndex)); +#if __has_featu

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-03 Thread Daniil Kovalev via cfe-commits
@@ -30,6 +30,45 @@ EXCEPTION_DISPOSITION _GCC_specific_handler(PEXCEPTION_RECORD, void *, PCONTEXT, _Unwind_Personality_Fn); #endif +#if __has_feature(ptrauth_qualifier) +#include +#if __has_feature(ptrauth_restricted_intptr_qualif

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-03 Thread Daniil Kovalev via cfe-commits
@@ -238,7 +282,20 @@ COMPILER_RT_ABI _Unwind_Reason_Code __gcc_personality_v0( _Unwind_SetGR(context, __builtin_eh_return_data_regno(0), (uintptr_t)exceptionObject); _Unwind_SetGR(context, __builtin_eh_return_data_regno(1), 0); - _Unwind_Set

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-03 Thread Daniil Kovalev via cfe-commits
https://github.com/kovdan01 requested changes to this pull request. https://github.com/llvm/llvm-project/pull/143230 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-03 Thread Daniil Kovalev via cfe-commits
@@ -377,13 +391,31 @@ const char *CFI_Parser::parseCIE(A &addressSpace, pint_t cie, case 'z': cieInfo->fdesHaveAugmentationData = true; break; - case 'P': + case 'P': { cieInfo->personalityEncoding = addressSpace.get8(p); ++p;

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-03 Thread Daniil Kovalev via cfe-commits
kovdan01 wrote: Thanks @ojhunt for updates! These resolve some of the previously found issues, but many problems are still present (both previously reported and newly found). I tried to resolve all the threads which are now no longer relevant, so please treat all the opened threads as issues w

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-03 Thread Daniil Kovalev via cfe-commits
@@ -681,7 +681,18 @@ DEFINE_LIBUNWIND_FUNCTION(__libunwind_Registers_arm64_jumpto) // context struct, because it is allocated on the stack, and an exception // could clobber the de-allocated portion of the stack after sp has been // restored. - ldrx16, [x0, #0x0

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-03 Thread Daniil Kovalev via cfe-commits
@@ -1047,18 +1051,26 @@ class UnwindCursor : public AbstractUnwindCursor{ bool getInfoFromFdeCie(const typename CFI_Parser::FDE_Info &fdeInfo, const typename CFI_Parser::CIE_Info &cieInfo, pint_t pc, uintptr_t dso_base); - bo

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-03 Thread Daniil Kovalev via cfe-commits
@@ -126,6 +130,36 @@ _LIBUNWIND_HIDDEN int __unw_set_reg(unw_cursor_t *cursor, unw_regnum_t regNum, // First, get the FDE for the old location and then update it. co->getInfo(&info); co->setInfoBasedOnIPRegister(false); + +#if __has_feature(ptrauth_calls) +

[clang] [clang][www] Documentation revision and proof read for features.html (PR #156620)

2025-09-03 Thread David Spickett via cfe-commits
https://github.com/DavidSpickett approved this pull request. LGTM. You need to adjust your GitHub email settings before I can merge this. See https://llvm.org/docs/DeveloperPolicy.html#email-addresses. https://github.com/llvm/llvm-project/pull/156620 ___

[clang] [flang] [llvm] [openmp] [Clang][OpenMP][LoopTransformations] Add support for "#pragma omp fuse" loop transformation directive and "looprange" clause (PR #139293)

2025-09-03 Thread Roger Ferrer Ibáñez via cfe-commits
@@ -1479,7 +1492,85 @@ class SemaOpenMP : public SemaBase { bool checkTransformableLoopNest( OpenMPDirectiveKind Kind, Stmt *AStmt, int NumLoops, SmallVectorImpl &LoopHelpers, - Stmt *&Body, SmallVectorImpl> &OriginalInits); + Stmt *&Body, SmallVectorImp

[clang] [clang][analyzer] Model `strxfrm` (PR #156507)

2025-09-03 Thread Alejandro Álvarez Ayllón via cfe-commits
https://github.com/alejandro-alvarez-sonarsource updated https://github.com/llvm/llvm-project/pull/156507 From 736d0dcf2e31f402607656bf14f8c8dd6539 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20=C3=81lvarez=20Ayll=C3=B3n?= Date: Fri, 29 Aug 2025 09:51:04 +0200 Subject: [PATCH 1/3] [

[clang] [llvm] [AMDGPU][gfx1250] Add 128B cooperative atomics (PR #156418)

2025-09-03 Thread Matt Arsenault via cfe-commits
@@ -6776,6 +6776,28 @@ void Verifier::visitIntrinsicCall(Intrinsic::ID ID, CallBase &Call) { "invalid vector type for format", &Call, Src1, Call.getArgOperand(2)); break; } + case Intrinsic::amdgcn_cooperative_atomic_load_32x4B: + case Intrinsic::amdgcn_coop

[clang] [libclang/python] Derive library function types from annotations (PR #142120)

2025-09-03 Thread Vlad Serebrennikov via cfe-commits
https://github.com/Endilll closed https://github.com/llvm/llvm-project/pull/142120 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][SPIRV] Set program address space for Intel-flavored SPIR-V (PR #135251)

2025-09-03 Thread Victor Lomuller via cfe-commits
https://github.com/Naghasan commented: sorry for the delay @sarnex I have 2 questions: - It seems strange to have different address spaces for 32/64. I understand you probably don't care about 32, but it is tested. - why mapping to generic ? This would conflict with https://github.com/intel/

[libclc] [NFC][libclc] Define _CLC_DEF_WEAK and replace _CLC_DEF_ldexp with it (PR #156378)

2025-09-03 Thread Wenju He via cfe-commits
wenju-he wrote: Applying weak attribute to a small set of libclc functions might be acceptable because libclc will eventually set linkage to linkonce_odr for all functions. The small set of libclc functions, that were not optimized by PostOrderFunctionAttrsPass during libclc build, will be opt

[clang] [C++20][Modules] Implement P1857R3 Modules Dependency Discovery (PR #107168)

2025-09-03 Thread Michael Spencer via cfe-commits
@@ -1778,10 +1778,20 @@ def ext_bit_int : Extension< } // end of Parse Issue category. let CategoryName = "Modules Issue" in { -def err_unexpected_module_decl : Error< - "module declaration can only appear at the top level">; +def err_invalid_module_or_import_directive : Erro

[clang] [clang] Remove written template args from implicit var tpl spec (PR #156329)

2025-09-03 Thread Andrey Ali Khan Bolshakov via cfe-commits
bolshakov-a wrote: I always forget about release notes, thanks! However, there isn't "Potential AST breaking changes" section but there is "AST Dumping Potentially Breaking Changes" one. But this PR doesn't change AST dumps. Maybe, "C++ Specific Potentially Breaking Changes"? https://github.c

[clang] [Sema] Diagnose use of if/else-if condition variable inside else-if/else branch(s) (PR #156436)

2025-09-03 Thread Erich Keane via cfe-commits
erichkeane wrote: > > IS a pattern folks actually use intentionally. So making this an error > > isn't something we can really do. > > Right, I think I wasn’t quite awake yet earlier because for some reason I was > only thinking about the very specific use case where the `if` statement > chec

[clang] [HLSL] Add copy assignment and construtor to resource types (PR #156075)

2025-09-03 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/156075 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [Clang] [C2y] Implement N3355 ‘NamedLoops’ (PR #152870)

2025-09-03 Thread Erich Keane via cfe-commits
@@ -1482,3 +1482,10 @@ bool CapturedStmt::capturesVariable(const VarDecl *Var) const { return false; } + +Stmt *LoopControlStmt::getLabelTarget() const { + Stmt *Target = TargetLabel->getStmt(); + while (isa_and_present(Target)) +Target = cast(Target)->getSubStmt(); +

[clang] [llvm] [InstCombine] Strip leading zero indices from GEP (PR #155415)

2025-09-03 Thread Nikita Popov via cfe-commits
nikic wrote: GVN doesn't seem to do anything particularly interesting there. I tried running this through llc to see how the codegen changes, but that gives: > LLVM ERROR: Cannot select: intrinsic %llvm.amdgcn.if Does this need extra llc flags beyond the triple? https://github.com/llvm/llvm-p

[clang] [CodeGen] Fix cleanup attribute for C89 for-loop init variables (PR #156643)

2025-09-03 Thread Jongmyeong Choi via cfe-commits
jongmyeong-choi wrote: I've implemented the change using a deferred cleanup approach. Initially, I considered pushing cleanups to the EHStack while manipulating PrologueCleanupDepth, but I felt this approach was too hacky. If there's a better approach for this fix, please let me know. https://g

[clang] [clang][bytecode] Reject null pointers in CheckStore() (PR #156645)

2025-09-03 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/156645 In the attached test case, the global variable later only points to gargbage, because the MaterializeTemporaryExpr used to initialize it is a local variable, which is gone by the time we try to evaluate the st

[clang-tools-extra] [clang-tidy] Fix `readability-uppercase-literal-suffix` warning with hex literals (PR #156584)

2025-09-03 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp commented: LGTM, I wonder why the `bB` was there in the first place. Binary numbers? https://github.com/llvm/llvm-project/pull/156584 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[clang] [CIR] Add support for constructors with VTT parameters (PR #156521)

2025-09-03 Thread Henrich Lauko via cfe-commits
@@ -723,6 +811,52 @@ void CIRGenFunction::emitCXXDestructorCall(const CXXDestructorDecl *dd, delegating, thisAddr, thisTy); } +mlir::Value CIRGenFunction::getVTTParameter(GlobalDecl gd, bool forVirtualBase, +

[clang] [CIR] Add support for constructors with VTT parameters (PR #156521)

2025-09-03 Thread Henrich Lauko via cfe-commits
@@ -549,3 +652,32 @@ bool CIRGenItaniumCXXABI::isVirtualOffsetNeededForVTableField( return false; return needsVTTParameter(cgf.curGD); } + +mlir::Value CIRGenItaniumCXXABI::getVirtualBaseClassOffset( +mlir::Location loc, CIRGenFunction &cgf, Address thisAddr, +co

[clang] [CIR] Add support for constructors with VTT parameters (PR #156521)

2025-09-03 Thread Henrich Lauko via cfe-commits
@@ -379,6 +395,23 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy { /*mem_order=*/cir::MemOrderAttr{}); } + cir::LoadOp createAlignedLoad(mlir::Location loc, mlir::Type ty, +mlir::Value ptr, llvm::MaybeA

[clang] [CIR] Add support for constructors with VTT parameters (PR #156521)

2025-09-03 Thread Henrich Lauko via cfe-commits
@@ -329,10 +330,35 @@ static Address applyNonVirtualAndVirtualOffset( loc, addr, baseValueTy, nonVirtualOffset.getQuantity(), assumeNotNull); } + } else { +baseOffset = virtualOffset; + } + + // Apply the base offset. cir.ptr_stride adjusts by a

[clang] [CIR] Add support for constructors with VTT parameters (PR #156521)

2025-09-03 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko edited https://github.com/llvm/llvm-project/pull/156521 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add support for constructors with VTT parameters (PR #156521)

2025-09-03 Thread Henrich Lauko via cfe-commits
@@ -723,6 +811,52 @@ void CIRGenFunction::emitCXXDestructorCall(const CXXDestructorDecl *dd, delegating, thisAddr, thisTy); } +mlir::Value CIRGenFunction::getVTTParameter(GlobalDecl gd, bool forVirtualBase, +

[clang] [CIR] Add support for constructors with VTT parameters (PR #156521)

2025-09-03 Thread Henrich Lauko via cfe-commits
@@ -329,10 +330,35 @@ static Address applyNonVirtualAndVirtualOffset( loc, addr, baseValueTy, nonVirtualOffset.getQuantity(), assumeNotNull); } + } else { +baseOffset = virtualOffset; + } + + // Apply the base offset. cir.ptr_stride adjusts by a

[clang] [CIR] Add support for constructors with VTT parameters (PR #156521)

2025-09-03 Thread Henrich Lauko via cfe-commits
@@ -287,6 +287,10 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy { cir::ConstantOp getUInt32(uint32_t c, mlir::Location loc) { return getConstantInt(loc, getUInt32Ty(), c); } + cir::ConstantOp getSInt64(uint64_t c, mlir::Location loc) { +cir::IntType sInt6

[clang] [CIR] Add support for constructors with VTT parameters (PR #156521)

2025-09-03 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko approved this pull request. lgtm, with minor nits https://github.com/llvm/llvm-project/pull/156521 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Enable constexpr handling for builtin elementwise fshl/fshr (PR #153572)

2025-09-03 Thread Chaitanya Koparkar via cfe-commits
ckoparkar wrote: @RKSimon Not much is left after #155405. I need to clean up the type checking assertions in the new interpreter, probably just remove them. I'll finish it soon. https://github.com/llvm/llvm-project/pull/153572 ___ cfe-commits mailing

[clang] [CIR] Add constant record ILE support (PR #155663)

2025-09-03 Thread Morris Hafner via cfe-commits
@@ -21,20 +20,526 @@ #include "clang/AST/APValue.h" #include "clang/AST/ASTContext.h" #include "clang/AST/Attr.h" +#include "clang/AST/CharUnits.h" #include "clang/AST/OperationKinds.h" #include "clang/AST/RecordLayout.h" #include "clang/AST/StmtVisitor.h" #include "clang/B

[clang] [CIR] Emit copy for aggregate initialization (PR #155697)

2025-09-03 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/155697 >From 36b02a82c306c31e8b824e365b0c7a6db34238d2 Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Wed, 27 Aug 2025 12:00:37 -0700 Subject: [PATCH 1/2] [CIR] Emit copy for aggregate initialization This adds the

[clang] [clang][WebAssembly] Handle casted function pointers with different number of arguments (PR #153168)

2025-09-03 Thread via cfe-commits
juj wrote: Re-reading back the original description of the PR, I see there's > This solves many open issues, like: > > * https://github.com/llvm/llvm-project/issues/64526 though this PR doesn't quite solve this, since it (silently?) will try to fix up the call sites with mismatching point

[clang] [CIR] Support ComplexType in CallExpr args (PR #156236)

2025-09-03 Thread Andy Kaylor via cfe-commits
@@ -909,3 +909,46 @@ void foo33(__builtin_va_list a) { // OGCG: %[[B_IMAG_PTR:.*]] = getelementptr inbounds nuw { float, float }, ptr %[[B_ADDR]], i32 0, i32 1 // OGCG: store float %[[RESULT_REAL]], ptr %[[B_REAL_PTR]], align 4 // OGCG: store float %[[RESULT_IMAG]], ptr %[[

[clang] [Clang][HIP][CUDA] Add `__cluster_dims__` and `__no_cluster__` attribute (PR #156686)

2025-09-03 Thread Shilei Tian via cfe-commits
shiltian wrote: > It isn't clear what these are, why/whether we want them, what their signature > is, etc. It is the support for [`__cluster_dims__` attribute](https://docs.nvidia.com/cuda/cuda-c-programming-guide/#thread-block-clusters). > Additionally, we do not allow adding undocumented at

[clang] [Clang][HIP][CUDA] Add `__cluster_dims__` and `__no_cluster__` attribute (PR #156686)

2025-09-03 Thread Erich Keane via cfe-commits
erichkeane wrote: > > It isn't clear what these are, why/whether we want them, what their > > signature is, etc. > > It is the support for [`__cluster_dims__` > attribute](https://docs.nvidia.com/cuda/cuda-c-programming-guide/#thread-block-clusters). ALL of this (including a summary that does

[clang] [OpenACC] Change lowering signature for 'destroy' (PR #156716)

2025-09-03 Thread Erich Keane via cfe-commits
https://github.com/erichkeane created https://github.com/llvm/llvm-project/pull/156716 Patch #156545 is introducing a different syntax for the 'destroy' section of a recipe, which takes the 'original' value as the first argument, and the one-to-be-destroyed as the 2nd. This patch corrects the

[clang] [HLSL] Add copy assignment and construtor to resource types (PR #156075)

2025-09-03 Thread Steven Perron via cfe-commits
@@ -828,11 +828,27 @@ llvm::Instruction *CGHLSLRuntime::getConvergenceToken(BasicBlock &BB) { class OpaqueValueVisitor : public RecursiveASTVisitor { public: - llvm::SmallPtrSet OVEs; + llvm::SmallVector OVEs; + llvm::SmallPtrSet Visited; OpaqueValueVisitor() {} + bo

[clang] [OpenACC] Change lowering signature for 'destroy' (PR #156716)

2025-09-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Erich Keane (erichkeane) Changes Patch #156545 is introducing a different syntax for the 'destroy' section of a recipe, which takes the 'original' value as the first argument, and the one-to-be-destroyed as the 2nd. This patch corrects t

[clang] [OpenACC] Change lowering signature for 'destroy' (PR #156716)

2025-09-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Erich Keane (erichkeane) Changes Patch #156545 is introducing a different syntax for the 'destroy' section of a recipe, which takes the 'original' value as the first argument, and the one-to-be-destroyed as the 2nd. This patch corrects

[clang] [CIR] Add constant record ILE support (PR #155663)

2025-09-03 Thread Morris Hafner via cfe-commits
@@ -21,20 +20,526 @@ #include "clang/AST/APValue.h" #include "clang/AST/ASTContext.h" #include "clang/AST/Attr.h" +#include "clang/AST/CharUnits.h" #include "clang/AST/OperationKinds.h" #include "clang/AST/RecordLayout.h" #include "clang/AST/StmtVisitor.h" #include "clang/B

[clang] [CIR] Add constant record ILE support (PR #155663)

2025-09-03 Thread Morris Hafner via cfe-commits
@@ -30,7 +30,8 @@ llvm::Align CIRDataLayout::getAlignment(mlir::Type ty, bool useABIAlign) const { return llvm::Align(1); // Get the layout annotation... which is lazily created on demand. -llvm_unreachable("getAlignment()) for record type is not implemented");

[clang] [clang] Add the candiscard attribute to suppress nodiscard (PR #154943)

2025-09-03 Thread via cfe-commits
@@ -199,6 +199,10 @@ Removed Compiler Flags Attribute Changes in Clang -- +- A new attribute ``[[clang::candiscard]]`` can be applied to a function returning a nodiscard type Sirraide wrote: I’m not aware of any discussion but perhaps

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-03 Thread Oliver Hunt via cfe-commits
@@ -557,7 +630,21 @@ set_registers(_Unwind_Exception* unwind_exception, _Unwind_Context* context, reinterpret_cast(unwind_exception)); _Unwind_SetGR(context, __builtin_eh_return_data_regno(1), static_cast(results.ttypeIndex)); +#if __has_featu

[clang] [clang][WebAssembly] Handle casted function pointers with different number of arguments (PR #153168)

2025-09-03 Thread Jorge Zapata via cfe-commits
turran wrote: > Re-reading back the original description of the PR, I see there's > > > This solves many open issues, like: > > ``` > > * https://github.com/llvm/llvm-project/issues/64526 > > ``` > > though this PR doesn't quite solve this, since it (silently?) will try to fix > up the call si

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-03 Thread Oliver Hunt via cfe-commits
@@ -1047,18 +1051,26 @@ class UnwindCursor : public AbstractUnwindCursor{ bool getInfoFromFdeCie(const typename CFI_Parser::FDE_Info &fdeInfo, const typename CFI_Parser::CIE_Info &cieInfo, pint_t pc, uintptr_t dso_base); - bo

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-03 Thread Oliver Hunt via cfe-commits
@@ -30,6 +30,45 @@ EXCEPTION_DISPOSITION _GCC_specific_handler(PEXCEPTION_RECORD, void *, PCONTEXT, _Unwind_Personality_Fn); #endif +#if __has_feature(ptrauth_qualifier) +#include +#if __has_feature(ptrauth_restricted_intptr_qualif

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-03 Thread Oliver Hunt via cfe-commits
@@ -541,7 +588,33 @@ struct scan_results }; } // unnamed namespace +} // extern "C" + +namespace { +// The logical model for casting authenticated function pointers makes +// it impossible to directly cast them without breaking the authentication, +// as a result we need this

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-03 Thread Oliver Hunt via cfe-commits
@@ -103,6 +103,52 @@ #define _LIBCXXABI_DTOR_FUNC #endif +#if __has_include() +# include +#endif ojhunt wrote: Once I get my local build setup again I will be doing a bunch of the ptrauth.h cleanup - there are many places that were obviously transitively i

[clang] [Headers][X86] Allow MMX/SSE integer min/max intrinsics to be used in constexpr (PR #156678)

2025-09-03 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon updated https://github.com/llvm/llvm-project/pull/156678 >From 5bdb914dc978150575a82f48e087f732f0e833ec Mon Sep 17 00:00:00 2001 From: Bhasawut Singhaphan Date: Wed, 3 Sep 2025 20:44:26 +0700 Subject: [PATCH] [Headers][X86] Allow MMX/SSE integer min/max intrinsics to

[clang] [llvm] [SPIRV] Add PreLegalizer pattern matching for `faceforward` (PR #139959)

2025-09-03 Thread Farzon Lotfi via cfe-commits
@@ -98,21 +110,98 @@ void applySPIRVDistance(MachineInstr &MI, MachineRegisterInfo &MRI, SPIRVGlobalRegistry *GR = MI.getMF()->getSubtarget().getSPIRVGlobalRegistry(); - auto RemoveAllUses = [&](Register Reg) { -SmallVector UsesToErase( -llvm::make_pointe

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-03 Thread Oliver Hunt via cfe-commits
@@ -103,10 +104,68 @@ #define _LIBCXXABI_DTOR_FUNC #endif -#if __cplusplus < 201103L -# define _LIBCXXABI_NOEXCEPT throw() -#else -# define _LIBCXXABI_NOEXCEPT noexcept +#if __has_include() +# include #endif +#if __has_extension(ptrauth_qualifier) + +// The actual value

[clang] [Headers][X86] Allow MMX/SSE integer min/max intrinsics to be used in constexpr (PR #156678)

2025-09-03 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon auto_merge_enabled https://github.com/llvm/llvm-project/pull/156678 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Headers][X86] Allow MMX/SSE integer min/max intrinsics to be used in constexpr (PR #156678)

2025-09-03 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon approved this pull request. LGTM - cheers https://github.com/llvm/llvm-project/pull/156678 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Emit copy for aggregate initialization (PR #155697)

2025-09-03 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/155697 >From 1eab5f0f18485d58934bf87c0f1f3014cb76a995 Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Wed, 27 Aug 2025 12:00:37 -0700 Subject: [PATCH 1/3] [CIR] Emit copy for aggregate initialization This adds the

[clang] [llvm] [AMDGPU] Support cluster_load_async_to_lds instructions on gfx1250 (PR #156595)

2025-09-03 Thread Changpeng Fang via cfe-commits
https://github.com/changpeng updated https://github.com/llvm/llvm-project/pull/156595 >From e1dd9629e396f1786903f7cda38072253ffaca00 Mon Sep 17 00:00:00 2001 From: Changpeng Fang Date: Tue, 2 Sep 2025 23:50:28 -0700 Subject: [PATCH 1/2] [AMDGPU] Support cluster_load_async_to_lds instructions o

[clang] [Headers][X86] Allow MMX/SSE integer min/max intrinsics to be used in constexpr (PR #156678)

2025-09-03 Thread Bhasawut Singhaphan via cfe-commits
markbhasawut wrote: Thanks for reviewing! @RKSimon https://github.com/llvm/llvm-project/pull/156678 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Support cluster_load_async_to_lds instructions on gfx1250 (PR #156595)

2025-09-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Changpeng Fang (changpeng) Changes --- Patch is 56.68 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/156595.diff 16 Files Affected: - (modified) clang/include/clang/Basic/BuiltinsAMDGPU.def

[clang] [llvm] [AMDGPU] Support cluster_load_async_to_lds instructions on gfx1250 (PR #156595)

2025-09-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-ir Author: Changpeng Fang (changpeng) Changes --- Patch is 56.68 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/156595.diff 16 Files Affected: - (modified) clang/include/clang/Basic/BuiltinsAMDGPU.d

[clang] [llvm] [AMDGPU] Support cluster_load_async_to_lds instructions on gfx1250 (PR #156595)

2025-09-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-amdgpu Author: Changpeng Fang (changpeng) Changes --- Patch is 56.68 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/156595.diff 16 Files Affected: - (modified) clang/include/clang/Basic/BuiltinsA

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-03 Thread Oliver Hunt via cfe-commits
@@ -16,6 +16,12 @@ #include #endif +#if __has_feature(ptrauth_calls) || defined(__PTRAUTH__) ojhunt wrote: I found this while updating the __PTRAUTH__ guards -- I would be ok leaving this as a task for you folk as I think this is a linux specific file? htt

[compiler-rt] [libcxx] [libcxxabi] [libunwind] [runtimes][PAC] Harden unwinding when possible (PR #143230)

2025-09-03 Thread Oliver Hunt via cfe-commits
ojhunt wrote: hmmm, I thought `ptrauth_calls` was one of the checks guarded by a darwin target so I might revert the `|| defined(__PTRAUTH__)` changes https://github.com/llvm/llvm-project/pull/143230 ___ cfe-commits mailing list cfe-commits@lists.llvm

[clang] [HLSL] Add copy assignment and construtor to resource types (PR #156075)

2025-09-03 Thread Steven Perron via cfe-commits
https://github.com/s-perron updated https://github.com/llvm/llvm-project/pull/156075 >From aaecbc5efd38190e8aedd9b3e3c95b2ede791a09 Mon Sep 17 00:00:00 2001 From: Steven Perron Date: Fri, 29 Aug 2025 13:40:55 -0400 Subject: [PATCH 1/2] [HLSL] Add copy assignment and construtor to resource type

[clang] [HLSL] Add copy assignment and construtor to resource types (PR #156075)

2025-09-03 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl Author: Steven Perron (s-perron) Changes The wrapper used to hold the handle for resource type has just the default copy constructor and assignment operator. This causes clang to insert memcpys when it does an assignment of a resource type. The memc

[clang] [clang] Add the candiscard attribute to suppress nodiscard (PR #154943)

2025-09-03 Thread via cfe-commits
Sirraide wrote: > I would also like to hear what @Sirraide thinks I don’t think I have any further comments; I think the implementation lgtm but I’ll leave it to @erichkeane to approve this. https://github.com/llvm/llvm-project/pull/154943 ___ cfe-co

[clang] [Headers][X86] Allow AVX512F mullox intrinsics to be used in constexpr (PR #156722)

2025-09-03 Thread Bhasawut Singhaphan via cfe-commits
https://github.com/markbhasawut created https://github.com/llvm/llvm-project/pull/156722 This PR fixes #155411, add constexpr support for the AVX512F mullox intrinsics: - _mm512_mullox_epi64 - _mm512_mask_mullox_epi64 Closes #156632. >From c6d19e89ea5c4878cb04dd30bc410237a53646eb Mon Sep

[clang] [HLSL] Add copy assignment and construtor to resource types (PR #156075)

2025-09-03 Thread Steven Perron via cfe-commits
@@ -1,49 +1,65 @@ -// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.6-compute -finclude-default-header \ s-perron wrote: Looking at the change, and it seems like the the CRLF was replaced with LF. My editors must have done that without me knowing. I can try to r

[clang] [llvm] [clang][CUDA] Avoid accounting for tail padding in LLVM offloading (PR #156229)

2025-09-03 Thread Kevin Sala Penades via cfe-commits
kevinsala wrote: My understanding is that the CUDA Driver API requires the arguments in the buffer to be placed with the proper alignment (i.e., padding between fields). However, the trailing padding after the last element should not be accounted. Otherwise, if it's accounted, the `cuLaunchKer

[clang] b176ba7 - [Headers][X86] Allow MMX/SSE integer min/max intrinsics to be used in constexpr (#156678)

2025-09-03 Thread via cfe-commits
Author: Bhasawut Singhaphan Date: 2025-09-03T17:46:55Z New Revision: b176ba78c8ded98cca955d4d32234fac8ada506c URL: https://github.com/llvm/llvm-project/commit/b176ba78c8ded98cca955d4d32234fac8ada506c DIFF: https://github.com/llvm/llvm-project/commit/b176ba78c8ded98cca955d4d32234fac8ada506c.diff

[clang] [Headers][X86] Allow MMX/SSE integer min/max intrinsics to be used in constexpr (PR #156678)

2025-09-03 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon closed https://github.com/llvm/llvm-project/pull/156678 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC] Change lowering signature for 'destroy' (PR #156716)

2025-09-03 Thread Razvan Lupusoru via cfe-commits
https://github.com/razvanlupusoru approved this pull request. Thank you! https://github.com/llvm/llvm-project/pull/156716 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   5   6   >