[clang] [llvm] [ValueTracking] Return true for AddrSpaceCast in canCreateUndefOrPoison (PR #144686)

2025-06-20 Thread Wenju He via cfe-commits
https://github.com/wenju-he updated https://github.com/llvm/llvm-project/pull/144686 >From b5c9a4834accbac18664f1431acc5204c0527fa8 Mon Sep 17 00:00:00 2001 From: Wenju He Date: Wed, 18 Jun 2025 14:21:09 +0200 Subject: [PATCH 1/4] [InstCombine] Don't folder select to or if value argument is us

[clang] [llvm] [ValueTracking] Return true for AddrSpaceCast in canCreateUndefOrPoison (PR #144686)

2025-06-20 Thread Nikita Popov via cfe-commits
@@ -10211,8 +10210,18 @@ bool AANoUndef::isImpliedByIR(Attributor &A, const IRPosition &IRP, return true; Value &Val = IRP.getAssociatedValue(); + auto IsTargetGuaranteedNotPoison = [&](Value &V) { +if (auto *ASC = dyn_cast(&V)) { + const auto *TTI = A.getInfo

[clang] [llvm] [ValueTracking] Return true for AddrSpaceCast in canCreateUndefOrPoison (PR #144686)

2025-06-20 Thread Nikita Popov via cfe-commits
nikic wrote: For the purposes of this PR, I think you should only change canCreateUndefOrPoison to return true and just eat the regressions. We can follow up with using isValidAddrSpaceCast() in a followup, because it will be less straightforward. I'm not willing to accept direct use of TTI in

[clang] [llvm] [ValueTracking] Return true for AddrSpaceCast in canCreateUndefOrPoison (PR #144686)

2025-06-20 Thread Wenju He via cfe-commits
wenju-he wrote: > For the purposes of this PR, I think you should only change > canCreateUndefOrPoison to return true and just eat the regressions. We can > follow up with using isValidAddrSpaceCast() in a followup, because it will be > less straightforward. I'm not willing to accept direct us

[clang] [CIR] Clean up enum attributes (PR #144999)

2025-06-20 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko ready_for_review https://github.com/llvm/llvm-project/pull/144999 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Clean up enum attributes (PR #144999)

2025-06-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Henrich Lauko (xlauko) Changes This mirrors incubator changes from https://github.com/llvm/clangir/pull/1678 - Create CIR specific EnumAttr bases and prefix enum attributes with CIR_ that automatically puts enum to cir namespace - Remove

[clang] Reapply "Reapply "[clang][bytecode] Allocate IntegralAP and Floating … (PR #145014)

2025-06-20 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 HEAD~1 HEAD --extensions cpp,h -- clang/lib/AST/ByteCode/ByteCodeEmitter.cpp clang/li

[clang] Reapply "Reapply "[clang][bytecode] Allocate IntegralAP and Floating … (PR #145014)

2025-06-20 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/145014 …types usi… (#144676)" This reverts commit 68471d29eed2c49f9b439e505b3f24d387d54f97. IntegralAP contains a union: union { uint64_t *Memory = nullptr; uint64_t Val; }; On 64bit systems, both Memory

[clang] [llvm] [ValueTracking] Return true for AddrSpaceCast in canCreateUndefOrPoison (PR #144686)

2025-06-20 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/144686 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Improve Markup Rendering (PR #140498)

2025-06-20 Thread via cfe-commits
mccakit wrote: ping @kadircet https://github.com/llvm/llvm-project/pull/140498 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Allocate IntegralAP and Floating types using an allocator (PR #144246)

2025-06-20 Thread David Spickett via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: DavidSpickett wrote: When applied to 7c15edb306932e41c159f3d69c161ed0d89d47b7, this fixes the problem and passes check-clang. Reland in whatever way you prefer (no need for extra review), as you know, the bot will rapi

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

2025-06-20 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur commented: Thanks for the work and sorry I could not have a look into it earlier https://github.com/llvm/llvm-project/pull/139293 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] [llvm] Ast importer visitors (PR #138838)

2025-06-20 Thread Balázs Kéri via cfe-commits
@@ -7359,6 +7549,150 @@ ExpectedStmt ASTNodeImporter::VisitExpr(Expr *E) { return make_error(ASTImportError::UnsupportedConstruct); } +ExpectedStmt ASTNodeImporter::VisitRequiresExpr(RequiresExpr* E) { + Error Err = Error::success(); + auto RequiresKWLoc = importChecked(Er

[clang] [llvm] Ast importer visitors (PR #138838)

2025-06-20 Thread Balázs Kéri via cfe-commits
https://github.com/balazske edited https://github.com/llvm/llvm-project/pull/138838 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-06-20 Thread Michael Kruse via cfe-commits
@@ -15499,6 +15836,496 @@ StmtResult SemaOpenMP::ActOnOpenMPInterchangeDirective( buildPreInits(Context, PreInits)); } +StmtResult SemaOpenMP::ActOnOpenMPFuseDirective(ArrayRef Clauses, +

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

2025-06-20 Thread Michael Kruse via cfe-commits
@@ -1479,7 +1492,109 @@ class SemaOpenMP : public SemaBase { bool checkTransformableLoopNest( OpenMPDirectiveKind Kind, Stmt *AStmt, int NumLoops, SmallVectorImpl &LoopHelpers, - Stmt *&Body, SmallVectorImpl> &OriginalInits); + Stmt *&Body, SmallVectorIm

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

2025-06-20 Thread Michael Kruse via cfe-commits
@@ -0,0 +1,50 @@ +// RUN: %libomp-compile-and-run | FileCheck %s --match-full-lines + +#ifndef HEADER +#define HEADER + +#include +#include + +int main() { + printf("do\n"); +#pragma omp fuse + { +for (int i = 5; i <= 25; i += 5) + printf("i=%d\n", i); +for (int

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

2025-06-20 Thread Michael Kruse via cfe-commits
@@ -11612,6 +11612,18 @@ def note_omp_implicit_dsa : Note< "implicitly determined as %0">; def err_omp_loop_var_dsa : Error< "loop iteration variable in the associated loop of 'omp %1' directive may not be %0, predetermined as %2">; +def err_omp_not_canonical_loop : Error

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

2025-06-20 Thread Michael Kruse via cfe-commits
@@ -0,0 +1,400 @@ +// Check no warnings/errors +// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -fopenmp -std=c++20 -fopenmp-version=60 -fsyntax-only -verify %s +// expected-no-diagnostics + +// Check AST and unparsing +// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -fopenmp -std

[clang] [llvm] Ast importer visitors (PR #138838)

2025-06-20 Thread Balázs Kéri via cfe-commits
@@ -1363,6 +1364,26 @@ extern const internal::VariadicDynCastAllOfMatcher extern const internal::VariadicDynCastAllOfMatcher conceptDecl; +/// Matches concept requirement. +/// +/// Example matches requirement expression balazske wrote: It is better to te

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

2025-06-20 Thread Michael Kruse via cfe-commits
@@ -973,6 +976,9 @@ class OMPLoopTransformationDirective : public OMPLoopBasedDirective { /// Set the number of loops generated by this loop transformation. void setNumGeneratedLoops(unsigned Num) { NumGeneratedLoops = Num; } + /// Set the number of top level canonical l

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

2025-06-20 Thread Michael Kruse via cfe-commits
@@ -15499,6 +15836,496 @@ StmtResult SemaOpenMP::ActOnOpenMPInterchangeDirective( buildPreInits(Context, PreInits)); } +StmtResult SemaOpenMP::ActOnOpenMPFuseDirective(ArrayRef Clauses, +

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

2025-06-20 Thread Michael Kruse via cfe-commits
@@ -14189,10 +14196,49 @@ StmtResult SemaOpenMP::ActOnOpenMPTargetTeamsDistributeSimdDirective( getASTContext(), StartLoc, EndLoc, NestedLoopCount, Clauses, AStmt, B); } +/// Overloaded base case function +template static bool tryHandleAs(T *t, F &&) { + return false;

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

2025-06-20 Thread Michael Kruse via cfe-commits
@@ -14219,27 +14265,320 @@ bool SemaOpenMP::checkTransformableLoopNest( return false; }, [&OriginalInits](OMPLoopBasedDirective *Transform) { -Stmt *DependentPreInits; -if (auto *Dir = dyn_cast(Transform)) - DependentPreInits = Dir->

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

2025-06-20 Thread Michael Kruse via cfe-commits
@@ -22,6 +22,7 @@ #include "clang/AST/DeclOpenMP.h" #include "clang/AST/DynamicRecursiveASTVisitor.h" #include "clang/AST/OpenMPClause.h" +#include "clang/AST/RecursiveASTVisitor.h" Meinersbur wrote: [nit] unused https://github.com/llvm/llvm-project/pull/1392

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

2025-06-20 Thread Michael Kruse via cfe-commits
@@ -11516,6 +11516,21 @@ def note_omp_implicit_dsa : Note< "implicitly determined as %0">; def err_omp_loop_var_dsa : Error< "loop iteration variable in the associated loop of 'omp %1' directive may not be %0, predetermined as %2">; +def warn_omp_different_loop_ind_var_typ

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

2025-06-20 Thread Michael Kruse via cfe-commits
@@ -15499,6 +15836,496 @@ StmtResult SemaOpenMP::ActOnOpenMPInterchangeDirective( buildPreInits(Context, PreInits)); } +StmtResult SemaOpenMP::ActOnOpenMPFuseDirective(ArrayRef Clauses, +

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

2025-06-20 Thread Michael Kruse via cfe-commits
@@ -0,0 +1,211 @@ +// RUN: %clang_cc1 -triple x86_64-pc-linux-gnu -std=c++20 -fopenmp -fopenmp-version=60 -fsyntax-only -Wuninitialized -verify %s + +void func() { + +// expected-error@+2 {{statement after '#pragma omp fuse' must be a loop sequence containing canonical loops

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

2025-06-20 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/139293 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ValueTracking] Return true for AddrSpaceCast in canCreateUndefOrPoison (PR #144686)

2025-06-20 Thread Wenju He via cfe-commits
wenju-he wrote: > For the purposes of this PR, I think you should only change > canCreateUndefOrPoison to return true and just eat the regressions. done. Please let me know if we should add FIXME for the regression in clang/test/CodeGenOpenCL/amdgcn-buffer-rsrc-type.cl and llvm/test/Transfor

[clang] [CIR] Clean up enum attributes (PR #144999)

2025-06-20 Thread Henrich Lauko via cfe-commits
xlauko wrote: * **#144999** https://app.graphite.dev/github/pr/llvm/llvm-project/144999?utm_source=stack-comment-icon"; target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite" width="10px" height="10px"/> 👈 https://app.graphite.dev/github/pr/llvm/llvm-project/14499

[clang] [CIR] Clean up enum attributes (PR #144999)

2025-06-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Henrich Lauko (xlauko) Changes This mirrors incubator changes from https://github.com/llvm/clangir/pull/1678 - Create CIR specific EnumAttr bases and prefix enum attributes with CIR_ that automatically puts enum to cir namespace - Remo

[clang] [CIR] Clean up enum attributes (PR #144999)

2025-06-20 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko created https://github.com/llvm/llvm-project/pull/144999 This mirrors incubator changes from https://github.com/llvm/clangir/pull/1678 - Create CIR specific EnumAttr bases and prefix enum attributes with CIR_ that automatically puts enum to cir namespace - Removes un

[clang] [llvm] [ValueTracking] Return true for AddrSpaceCast in canCreateUndefOrPoison (PR #144686)

2025-06-20 Thread Nikita Popov via cfe-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/144686 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ValueTracking] Return true for AddrSpaceCast in canCreateUndefOrPoison (PR #144686)

2025-06-20 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,24 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 +; RUN: opt -S -mtriple=amdgcn-amd-amdhsa -passes=instcombine %s | FileCheck %s + +; Check that `select B, true, C` isn't optimized to `or B, C`. nik

[clang] [flang] DRAFT: [flang][OpenMP] Remove experimental warning (PR #144915)

2025-06-20 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/144915 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] DRAFT: [flang][OpenMP] Remove experimental warning (PR #144915)

2025-06-20 Thread Tom Eccles via cfe-commits
https://github.com/tblah updated https://github.com/llvm/llvm-project/pull/144915 >From e41a93accace06b39e8421fddbfd7673a3b429dc Mon Sep 17 00:00:00 2001 From: Tom Eccles Date: Thu, 19 Jun 2025 14:57:04 + Subject: [PATCH 1/2] DRAFT: [flang][OpenMP] Remove experimental warning RFC: https:/

[clang] [llvm] Ast importer visitors (PR #138838)

2025-06-20 Thread via cfe-commits
https://github.com/ganenkokb-yandex updated https://github.com/llvm/llvm-project/pull/138838 >From 6a4d62ce1c72639d7fe82565744b3e8808dce4c3 Mon Sep 17 00:00:00 2001 From: Evianaive <153540...@qq.com> Date: Tue, 25 Mar 2025 01:54:06 +0800 Subject: [PATCH 01/19] Implement missing visit function -

[clang] KISHAN KUMAR S D, HRUTHIK K K , KIRAN V-R V COLLEGE OF ENGINEERING(CSE 6TH SEM)-Implement Clang identifiers to retrieve the mangled name and the fully qualified name of functions #5 (PR #14504

2025-06-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: KISHAN KUMAR S D (kishan-kumar-s-d-444) Changes # Add `__fq_func__` and `__mangled_func__` predefined identifiers to Clang ## Summary This pull request introduces two new predefined identifiers to Clang: 1. `__fq_func__` - Returns the ful

[clang] KISHAN KUMAR S D, HRUTHIK K K , KIRAN V-R V COLLEGE OF ENGINEERING(CSE 6TH SEM)-Implement Clang identifiers to retrieve the mangled name and the fully qualified name of functions #5 (PR #14504

2025-06-20 Thread KISHAN KUMAR S D via cfe-commits
https://github.com/kishan-kumar-s-d-444 created https://github.com/llvm/llvm-project/pull/145042 # Add `__fq_func__` and `__mangled_func__` predefined identifiers to Clang ## Summary This pull request introduces two new predefined identifiers to Clang: 1. `__fq_func__` - Returns the fully qual

[clang] [Clang] Implement diagnostics for why is_empty is false (PR #145044)

2025-06-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Samarth Narang (snarang181) Changes Expands on https://github.com/llvm/llvm-project/issues/141911 --- Full diff: https://github.com/llvm/llvm-project/pull/145044.diff 4 Files Affected: - (modified) clang/include/clang/Basic/DiagnosticSe

[clang] [Clang] Implement diagnostics for why is_empty is false (PR #145044)

2025-06-20 Thread Samarth Narang via cfe-commits
https://github.com/snarang181 ready_for_review https://github.com/llvm/llvm-project/pull/145044 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-06-20 Thread Walter J.T.V via cfe-commits
eZWALT wrote: > Thanks for the work and sorry I could not have a look into it earlier Nono, thank you for your time and guidance! Between today and tomorrow i'll upload the updated version, thanks for taking the time to improve it and the nitpicks! https://github.com/llvm/llvm-project/pull/13

[clang] [llvm] [AArch64] Add CodeGen support for scalar FEAT_CPA (PR #105669)

2025-06-20 Thread David Green via cfe-commits
https://github.com/davemgreen edited https://github.com/llvm/llvm-project/pull/105669 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][SPRIV] Handle signed RWBuffer correctly (PR #144774)

2025-06-20 Thread Nathan Gauër via cfe-commits
https://github.com/Keenuts approved this pull request. https://github.com/llvm/llvm-project/pull/144774 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Add CodeGen support for scalar FEAT_CPA (PR #105669)

2025-06-20 Thread David Green via cfe-commits
@@ -0,0 +1,723 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5 +; RUN: llc -mtriple=aarch64 -verify-machineinstrs --mattr=+cpa -aarch64-use-featcpa-codegen=true -O0 -global-isel=1 -global-isel-abort=1 %s -o - 2>&1 | FileCh

[clang] [llvm] [HLSL][SPRIV] Handle signed RWBuffer correctly (PR #144774)

2025-06-20 Thread Steven Perron via cfe-commits
s-perron wrote: @michalpaszkowski Any problems with me creating the new parallel type `spirv.SignedImage`? https://github.com/llvm/llvm-project/pull/144774 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[clang] [flang] [llvm] [flang][AArch64] Always link compiler-rt to flang after libgcc (PR #144710)

2025-06-20 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu approved this pull request. Other than the question about `Flang-RT` vs `compiler-rt` in the `llvm/CMakeLists`, this looks good to me. Thanks. https://github.com/llvm/llvm-project/pull/144710 ___ cfe-commits mailing list

[clang] [flang] [llvm] [flang][AArch64] Always link compiler-rt to flang after libgcc (PR #144710)

2025-06-20 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu edited https://github.com/llvm/llvm-project/pull/144710 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [flang][AArch64] Always link compiler-rt to flang after libgcc (PR #144710)

2025-06-20 Thread Tarun Prabhu via cfe-commits
@@ -653,6 +653,13 @@ if(LLVM_EXPERIMENTAL_TARGETS_TO_BUILD STREQUAL "all") set(LLVM_EXPERIMENTAL_TARGETS_TO_BUILD ${LLVM_ALL_EXPERIMENTAL_TARGETS}) endif() +if("flang" IN_LIST LLVM_ENABLE_PROJECTS AND + "AArch64" IN_LIST LLVM_TARGETS_TO_BUILD AND + NOT "compiler-rt" IN_

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

2025-06-20 Thread Walter J.T.V via cfe-commits
@@ -1143,6 +1143,97 @@ class OMPFullClause final : public OMPNoChildClause { static OMPFullClause *CreateEmpty(const ASTContext &C); }; +/// This class represents the 'looprange' clause in the +/// '#pragma omp fuse' directive +/// +/// \code {c} +/// #pragma omp fuse loopr

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

2025-06-20 Thread Walter J.T.V via cfe-commits
@@ -508,6 +512,43 @@ OMPInterchangeDirective::CreateEmpty(const ASTContext &C, unsigned NumClauses, SourceLocation(), SourceLocation(), NumLoops); } +OMPFuseDirective *OMPFuseDirective::Create( +const ASTContext &C, SourceLocation StartLoc, SourceLocation EndLoc, +

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

2025-06-20 Thread Walter J.T.V via cfe-commits
@@ -3256,9 +3256,8 @@ LValue CodeGenFunction::EmitDeclRefLValue(const DeclRefExpr *E) { var, ConvertTypeForMem(VD->getType()), getContext().getDeclAlign(VD)); // No other cases for now. -} else { +} else llvm_unreachable("DeclRefExpr for Decl not

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

2025-06-20 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur commented: Thanks for the work and sorry I could not have a look into it earlier https://github.com/llvm/llvm-project/pull/139293 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

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

2025-06-20 Thread Walter J.T.V via cfe-commits
@@ -3256,9 +3256,8 @@ LValue CodeGenFunction::EmitDeclRefLValue(const DeclRefExpr *E) { var, ConvertTypeForMem(VD->getType()), getContext().getDeclAlign(VD)); // No other cases for now. -} else { +} else llvm_unreachable("DeclRefExpr for Decl not

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

2025-06-20 Thread Walter J.T.V via cfe-commits
https://github.com/eZWALT deleted https://github.com/llvm/llvm-project/pull/139293 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-06-20 Thread Walter J.T.V via cfe-commits
https://github.com/eZWALT edited https://github.com/llvm/llvm-project/pull/139293 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-06-20 Thread Alexey Bataev via cfe-commits
@@ -1479,7 +1492,109 @@ class SemaOpenMP : public SemaBase { bool checkTransformableLoopNest( OpenMPDirectiveKind Kind, Stmt *AStmt, int NumLoops, SmallVectorImpl &LoopHelpers, - Stmt *&Body, SmallVectorImpl> &OriginalInits); + Stmt *&Body, SmallVectorIm

[clang] bd36f73 - [CIR] Add initial support for bitfields in structs (#142041)

2025-06-20 Thread via cfe-commits
Author: Andres-Salamanca Date: 2025-06-20T09:03:02-05:00 New Revision: bd36f7331a9f575272aebb9e0163194541110912 URL: https://github.com/llvm/llvm-project/commit/bd36f7331a9f575272aebb9e0163194541110912 DIFF: https://github.com/llvm/llvm-project/commit/bd36f7331a9f575272aebb9e0163194541110912.di

[clang] [ExtractAPI] Include +/- symbols for ObjC methods (PR #145035)

2025-06-20 Thread Prajwal Nadig via cfe-commits
https://github.com/snprajwal created https://github.com/llvm/llvm-project/pull/145035 ObjC methods include a +/- prefix to indicate if they are a class or instance method. This information is valuable, and must be included in the navigator generated by ExtractAPI. rdar://150870936 >From 5937

[clang] [Preprocessor] Do not expand macros if the input is already preprocessed (PR #137665)

2025-06-20 Thread Juan Manuel Martinez Caamaño via cfe-commits
https://github.com/jmmartinez updated https://github.com/llvm/llvm-project/pull/137665 From f0d1f76540ca2121a7b70c71c7403a7d45584482 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20Martinez=20Caama=C3=B1o?= Date: Mon, 28 Apr 2025 17:05:46 +0200 Subject: [PATCH 1/8] Pre-commit test: [Pr

[clang] [llvm] [AArch64] Add CodeGen support for scalar FEAT_CPA (PR #105669)

2025-06-20 Thread Rodolfo Wottrich via cfe-commits
@@ -0,0 +1,723 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5 +; RUN: llc -mtriple=aarch64 -verify-machineinstrs --mattr=+cpa -aarch64-use-featcpa-codegen=true -O0 -global-isel=1 -global-isel-abort=1 %s -o - 2>&1 | FileCh

[clang] Inject compilation command into __cli_ global variable (PR #144622)

2025-06-20 Thread via cfe-commits
https://github.com/Pavithra029 updated https://github.com/llvm/llvm-project/pull/144622 >From d41ac68039e6d654249fbeceb3b77c4b6780f9c0 Mon Sep 17 00:00:00 2001 From: pavithra Date: Wed, 18 Jun 2025 05:50:13 +0530 Subject: [PATCH 1/2] Inject compilation command into __cli_ global variable ---

[clang] [llvm] [AArch64] Add CodeGen support for scalar FEAT_CPA (PR #105669)

2025-06-20 Thread Rodolfo Wottrich via cfe-commits
@@ -0,0 +1,723 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5 +; RUN: llc -mtriple=aarch64 -verify-machineinstrs --mattr=+cpa -aarch64-use-featcpa-codegen=true -O0 -global-isel=1 -global-isel-abort=1 %s -o - 2>&1 | FileCh

[clang] [llvm] [AArch64] Add CodeGen support for scalar FEAT_CPA (PR #105669)

2025-06-20 Thread Rodolfo Wottrich via cfe-commits
@@ -10716,6 +10716,21 @@ let Predicates = [HasCPA] in { // Scalar multiply-add/subtract def MADDPT : MulAccumCPA<0, "maddpt">; def MSUBPT : MulAccumCPA<1, "msubpt">; + + def : Pat<(ptradd GPR64sp:$Rn, GPR64sp:$Rm), +(ADDPT_shift GPR64sp:$Rn, GPR64sp:$Rm, (i32

[clang] [llvm] [AArch64] Add CodeGen support for scalar FEAT_CPA (PR #105669)

2025-06-20 Thread Jonathan Thackray via cfe-commits
https://github.com/jthackray approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/105669 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LLVM][Clang] Add and enable strict mode for `getTrailingObjects` (PR #144930)

2025-06-20 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/144930 >From e98584961d23ea73981fa17c644e5eec03e58e11 Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Thu, 19 Jun 2025 10:25:12 -0700 Subject: [PATCH] [LLVM][Clang] Add and enable strict mode for `getTrailingObjects`

[clang] [llvm] [AArch64] Add CodeGen support for scalar FEAT_CPA (PR #105669)

2025-06-20 Thread Oliver Stannard via cfe-commits
https://github.com/ostannard approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/105669 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-06-20 Thread Walter J.T.V via cfe-commits
@@ -1479,7 +1492,109 @@ class SemaOpenMP : public SemaBase { bool checkTransformableLoopNest( OpenMPDirectiveKind Kind, Stmt *AStmt, int NumLoops, SmallVectorImpl &LoopHelpers, - Stmt *&Body, SmallVectorImpl> &OriginalInits); + Stmt *&Body, SmallVectorIm

[clang] [llvm] Ast importer visitors (PR #138838)

2025-06-20 Thread via cfe-commits
ganenkokb-yandex wrote: > Code looks almost acceptable. I could not verify if the tests are sufficient > (I am not familiar with this new syntax). Can you test this on large projects > that use these types of expressions? It is my approach. All fixes aside ASTImporter are came from real cases.

[clang] 96ab74b - [InstCombine] remove undef loads, such as memcpy from undef (#143958)

2025-06-20 Thread via cfe-commits
Author: Jameson Nash Date: 2025-06-20T10:32:31-04:00 New Revision: 96ab74bf175f46de4b6fbfc68deecd3567e42a52 URL: https://github.com/llvm/llvm-project/commit/96ab74bf175f46de4b6fbfc68deecd3567e42a52 DIFF: https://github.com/llvm/llvm-project/commit/96ab74bf175f46de4b6fbfc68deecd3567e42a52.diff

[clang] [llvm] [InstCombine] remove dead loads, such as memcpy from undef (PR #143958)

2025-06-20 Thread Jameson Nash via cfe-commits
https://github.com/vtjnash closed https://github.com/llvm/llvm-project/pull/143958 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-06-20 Thread Walter J.T.V via cfe-commits
@@ -14189,10 +14196,49 @@ StmtResult SemaOpenMP::ActOnOpenMPTargetTeamsDistributeSimdDirective( getASTContext(), StartLoc, EndLoc, NestedLoopCount, Clauses, AStmt, B); } +/// Overloaded base case function +template static bool tryHandleAs(T *t, F &&) { + return false;

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

2025-06-20 Thread Walter J.T.V via cfe-commits
@@ -15499,6 +15836,496 @@ StmtResult SemaOpenMP::ActOnOpenMPInterchangeDirective( buildPreInits(Context, PreInits)); } +StmtResult SemaOpenMP::ActOnOpenMPFuseDirective(ArrayRef Clauses, +

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

2025-06-20 Thread Walter J.T.V via cfe-commits
@@ -15499,6 +15836,496 @@ StmtResult SemaOpenMP::ActOnOpenMPInterchangeDirective( buildPreInits(Context, PreInits)); } +StmtResult SemaOpenMP::ActOnOpenMPFuseDirective(ArrayRef Clauses, +

[clang] [ExtractAPI] Include +/- symbols for ObjC methods (PR #145035)

2025-06-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Prajwal Nadig (snprajwal) Changes ObjC methods include a +/- prefix to indicate if they are a class or instance method. This information is valuable, and must be included in the navigator generated by ExtractAPI. rdar://150870936 --- Fu

[clang] [llvm] [AArch64] Add CodeGen support for scalar FEAT_CPA (PR #105669)

2025-06-20 Thread David Green via cfe-commits
@@ -10716,6 +10716,21 @@ let Predicates = [HasCPA] in { // Scalar multiply-add/subtract def MADDPT : MulAccumCPA<0, "maddpt">; def MSUBPT : MulAccumCPA<1, "msubpt">; + + def : Pat<(ptradd GPR64sp:$Rn, GPR64sp:$Rm), +(ADDPT_shift GPR64sp:$Rn, GPR64sp:$Rm, (i32

[clang] [llvm] [AArch64] Add CodeGen support for scalar FEAT_CPA (PR #105669)

2025-06-20 Thread David Green via cfe-commits
https://github.com/davemgreen commented: Thanks for the updates, this is quite a bit simpler now. As far as I can tell this looks OK to me. https://github.com/llvm/llvm-project/pull/105669 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

[clang] [llvm] [AArch64] Add CodeGen support for scalar FEAT_CPA (PR #105669)

2025-06-20 Thread David Green via cfe-commits
https://github.com/davemgreen edited https://github.com/llvm/llvm-project/pull/105669 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Inject compilation command into __cli_ global variable (PR #144622)

2025-06-20 Thread via cfe-commits
https://github.com/Pavithra029 updated https://github.com/llvm/llvm-project/pull/144622 >From d41ac68039e6d654249fbeceb3b77c4b6780f9c0 Mon Sep 17 00:00:00 2001 From: pavithra Date: Wed, 18 Jun 2025 05:50:13 +0530 Subject: [PATCH 1/2] Inject compilation command into __cli_ global variable ---

[clang] [HLSL][SPIRV] Allow large z value in numthreads (PR #144934)

2025-06-20 Thread Steven Perron via cfe-commits
@@ -1033,12 +1033,15 @@ void SemaHLSL::handleRootSignatureAttr(Decl *D, const ParsedAttr &AL) { void SemaHLSL::handleNumThreadsAttr(Decl *D, const ParsedAttr &AL) { llvm::VersionTuple SMVersion = getASTContext().getTargetInfo().getTriple().getOSVersion(); + bool IsDXI

[clang] [flang] [llvm] [flang][AArch64] Always link compiler-rt to flang after libgcc (PR #144710)

2025-06-20 Thread Kiran Chandramohan via cfe-commits
https://github.com/kiranchandramohan updated https://github.com/llvm/llvm-project/pull/144710 >From 2c278271277823b3544d991365e58f97dd4b7031 Mon Sep 17 00:00:00 2001 From: David Truby Date: Wed, 18 Jun 2025 10:17:05 +0100 Subject: [PATCH] [flang][AArch64] Always compiler-rt to flang linking aft

[clang] 14e89b0 - [C++20] [Modules] Add exported modules as transitive imported modules

2025-06-20 Thread Chuanqi Xu via cfe-commits
Author: Chuanqi Xu Date: 2025-06-20T17:03:29+08:00 New Revision: 14e89b061fdecedcec4bb035060a56588610cb5c URL: https://github.com/llvm/llvm-project/commit/14e89b061fdecedcec4bb035060a56588610cb5c DIFF: https://github.com/llvm/llvm-project/commit/14e89b061fdecedcec4bb035060a56588610cb5c.diff LO

[clang] [CIR] Add initial support for bitfields in structs (PR #142041)

2025-06-20 Thread via cfe-commits
https://github.com/Andres-Salamanca closed https://github.com/llvm/llvm-project/pull/142041 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [BUG] Fix : #139514 (PR #144956)

2025-06-20 Thread Rahul Samajpati via cfe-commits
https://github.com/RahulXDTT closed https://github.com/llvm/llvm-project/pull/144956 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][OpenCL] Declare cl_amd_media_ops/cl_amd_media_ops2 builtins with -fdeclare-opencl-builtins (PR #143507)

2025-06-20 Thread Juan Manuel Martinez Caamaño via cfe-commits
https://github.com/jmmartinez updated https://github.com/llvm/llvm-project/pull/143507 From 813e65b376216543f0250270f2b59ef888adf35d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Manuel=20Martinez=20Caama=C3=B1o?= Date: Tue, 10 Jun 2025 12:28:35 +0200 Subject: [PATCH 1/6] [Clang][OpenCL] Pre-

[clang-tools-extra] Use spelling for clangd missing includes filtering (PR #143411)

2025-06-20 Thread kadir çetinkaya via cfe-commits
kadircet wrote: sorry for silence here, i was mostly waiting for some replies to https://github.com/llvm/llvm-project/pull/140594#issuecomment-2958066558. as it stands, i feel like we'll likely limit users with a spelling based filter. unless people have concerns/disagreement, i'd suggest we r

[clang] [clang] Register all LLVM targets in AllClangUnitTest main (PR #144428)

2025-06-20 Thread kadir çetinkaya via cfe-commits
@@ -117,6 +117,7 @@ get_property(LINK_LIBS GLOBAL PROPERTY CLANG_UNITTEST_LINK_LIBS) get_property(LLVM_COMPONENTS GLOBAL PROPERTY CLANG_UNITTEST_LLVM_COMPONENTS) add_distinct_clang_unittest(AllClangUnitTests ${SRCS} + AllClangUnitTests.cpp kadircet wrote:

[clang] [clang] Register all LLVM targets in AllClangUnitTest main (PR #144428)

2025-06-20 Thread kadir çetinkaya via cfe-commits
https://github.com/kadircet approved this pull request. https://github.com/llvm/llvm-project/pull/144428 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LLVM][Clang] Add and enable strict mode for `getTrailingObjects` (PR #144930)

2025-06-20 Thread Rahul Joshi via cfe-commits
https://github.com/jurahul updated https://github.com/llvm/llvm-project/pull/144930 >From f5216d4c55c4dffa8785ff2fa051492ed98f405a Mon Sep 17 00:00:00 2001 From: Rahul Joshi Date: Thu, 19 Jun 2025 10:25:12 -0700 Subject: [PATCH] [LLVM][Clang] Add and enable strict mode for `getTrailingObjects`

[clang-tools-extra] [clang-tidy] Add `performance-explicit-move-constructor` check (PR #122599)

2025-06-20 Thread Julian Schmidt via cfe-commits
5chmidti wrote: > > but this check could check the signatures themselves to be in the expected > > form > > So warning for signatures like `foo(foo&) = default`? Looking at this again, maybe this shouldn't not that route. Other checks already capture some of those problems. What @PiotrZSL me

[clang] [llvm] Ast importer visitors (PR #138838)

2025-06-20 Thread Balázs Kéri via cfe-commits
balazske wrote: If `FromTypeRequirement.isSubstitutionFailure()` can be true at compile error it can be still possible to call `testImport` or `getTuDecl` with the code. https://github.com/llvm/llvm-project/pull/138838 ___ cfe-commits mailing list cfe

[clang] [lldb] [Clang][PowerPC] Add __dmr1024 type and DMF integer calculation builtins (PR #142480)

2025-06-20 Thread Maryam Moghadas via cfe-commits
https://github.com/maryammo closed https://github.com/llvm/llvm-project/pull/142480 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Add function scope identifier (PR #145074)

2025-06-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: KUSHAL R U (KushalRU11) Changes This PR introduces a new Clang-based tool: FunctionScopeIdentifier. The tool identifies C/C++ functions that span specific line ranges in a source file. It extends Clang’s tooling interface by supporting a

[clang] 65cb3bc - [Clang][PowerPC] Add __dmr1024 type and DMF integer calculation builtins (#142480)

2025-06-20 Thread via cfe-commits
Author: Maryam Moghadas Date: 2025-06-20T13:03:14-04:00 New Revision: 65cb3bcf327da8f9740e56897bc9954364e59eb6 URL: https://github.com/llvm/llvm-project/commit/65cb3bcf327da8f9740e56897bc9954364e59eb6 DIFF: https://github.com/llvm/llvm-project/commit/65cb3bcf327da8f9740e56897bc9954364e59eb6.dif

[clang] [llvm] KISHAN KUMAR S D, HRUTHIK K K , KIRAN V-R V COLLEGE OF ENGINEERING(CSE 6TH SEM)-Implement Clang identifiers to retrieve the mangled name and the fully qualified name of functions #5 (PR

2025-06-20 Thread KISHAN KUMAR S D via cfe-commits
https://github.com/kishan-kumar-s-d-444 updated https://github.com/llvm/llvm-project/pull/145042 >From fdf7f676690f7af5109970f239eba8f34850442f Mon Sep 17 00:00:00 2001 From: KISHAN KUMAR S D Date: Fri, 20 Jun 2025 19:35:57 +0530 Subject: [PATCH 1/6] Update Expr.h --- clang/include/clang/AST/

[clang] __sys builtin support (PR #145079)

2025-06-20 Thread Adam Glass via cfe-commits
https://github.com/AdamGlass created https://github.com/llvm/llvm-project/pull/145079 Adds support for __sys Clang builtin for Aarch64 __sys is a long existing MSVC intrinsic used to manage caches, tlbs, etc by writing to system registers: • It takes a macro-generated constant and uses it to f

[clang] __sys builtin support (PR #145079)

2025-06-20 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Adam Glass (AdamGlass) Changes Adds support for __sys Clang builtin for Aarch64 __sys is a long existing MSVC intrinsic used to manage caches, tlbs, etc by writing to system registers: • It takes a macro-generated constant and uses it to

[clang] __sys builtin support (PR #145079)

2025-06-20 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[clang] [clang][ARM] Include arm_acle.h in intrin.h on supported platforms (PR #144172)

2025-06-20 Thread Nick Sarnie via cfe-commits
@@ -50,11 +50,11 @@ BUILTIN(__builtin_arm_wfi, "v", "") BUILTIN(__builtin_arm_sev, "v", "") BUILTIN(__builtin_arm_sevl, "v", "") BUILTIN(__builtin_arm_chkfeat, "WUiWUi", "") -TARGET_HEADER_BUILTIN(__yield, "v", "h", ARMACLE_H, ALL_LANGUAGES, "") -TARGET_HEADER_BUILTIN(__wfe,

  1   2   3   >