[clang] [llvm] AMDGPU: Move enqueued block handling into clang (PR #128519)

2025-02-24 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm ready_for_review https://github.com/llvm/llvm-project/pull/128519 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-02-24 Thread Erich Keane via cfe-commits
@@ -625,6 +625,41 @@ static Attr *handleHLSLControlFlowHint(Sema &S, Stmt *St, const ParsedAttr &A, return ::new (S.Context) HLSLControlFlowHintAttr(S.Context, A); } +static Attr *handleAtomicAttr(Sema &S, Stmt *St, const ParsedAttr &AL, + Sourc

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

2025-02-24 Thread Erich Keane via cfe-commits
@@ -625,6 +625,43 @@ static Attr *handleHLSLControlFlowHint(Sema &S, Stmt *St, const ParsedAttr &A, return ::new (S.Context) HLSLControlFlowHintAttr(S.Context, A); } +static Attr *handleAtomicAttr(Sema &S, Stmt *St, const ParsedAttr &A, + Source

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

2025-02-24 Thread Erich Keane via cfe-commits
@@ -3286,6 +3286,8 @@ def err_invalid_branch_protection_spec : Error< "invalid or misplaced branch protection specification '%0'">; def warn_unsupported_branch_protection_spec : Warning< "unsupported branch protection specification '%0'">, InGroup; +def err_attribute_inval

[clang] [CIR] Better handling of `void` function return (PR #128089)

2025-02-24 Thread Erich Keane via cfe-commits
@@ -331,9 +335,38 @@ FuncType FuncType::clone(TypeRange inputs, TypeRange results) const { return get(llvm::to_vector(inputs), results[0], isVarArg()); } -mlir::ParseResult parseFuncTypeArgs(mlir::AsmParser &p, -llvm::SmallVector ¶ms, -

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

2025-02-24 Thread Erich Keane via cfe-commits
@@ -1107,6 +1113,66 @@ inline void FPOptions::applyChanges(FPOptionsOverride FPO) { *this = FPO.applyOverrides(*this); } +// The three atomic code-generation options. +// The canonical (positive) names are: +// "remote_memory", "fine_grained_memory", and "ignore_denormal_

[clang] [NFC][analyzer] OOB test consolidation III: 'outofbound' tests (PR #128508)

2025-02-24 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/128508 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 22a5bb3 - [analyzer] Limit Store by region-store-binding-limit (#127602)

2025-02-24 Thread via cfe-commits
Author: Balázs Benics Date: 2025-02-24T15:48:06+01:00 New Revision: 22a5bb32b787443b70476cc1359709b6c888b591 URL: https://github.com/llvm/llvm-project/commit/22a5bb32b787443b70476cc1359709b6c888b591 DIFF: https://github.com/llvm/llvm-project/commit/22a5bb32b787443b70476cc1359709b6c888b591.diff

[clang] [analyzer] Limit Store by region-store-binding-limit (PR #127602)

2025-02-24 Thread via cfe-commits
github-actions[bot] wrote: @balazs-benics-sonarsource 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 pro

[clang] [analyzer] Limit Store by region-store-binding-limit (PR #127602)

2025-02-24 Thread Balázs Benics via cfe-commits
https://github.com/balazs-benics-sonarsource closed https://github.com/llvm/llvm-project/pull/127602 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [analyzer] Update the undefined assignment checker diagnostics to not use the term 'garbage' (PR #126596)

2025-02-24 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat approved this pull request. LGTM, I agree that "uninitialized" is a better phrasing -- it's shorter and explicitly names the "normal" reason for getting `UndefinedVal`s. > I think the right path is to issue a more precise error message for > out-of-bounds reads. As

[clang-tools-extra] [clang-tidy] Add new check bugprone-unintended-char-ostream-output (PR #127720)

2025-02-24 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 updated https://github.com/llvm/llvm-project/pull/127720 >From b69bb465a24f2175f2f9f91f220252d3bcb27bde Mon Sep 17 00:00:00 2001 From: Congcong Cai Date: Wed, 19 Feb 2025 07:38:37 +0800 Subject: [PATCH 01/10] [clang-tidy]add new check bugprone-unintended-char-ost

[clang-tools-extra] [clang-tidy]improve performance-unnecessary-value-param performance (PR #128383)

2025-02-24 Thread Congcong Cai via cfe-commits
HerrCai0907 wrote: ### Merge activity * **Feb 24, 9:58 AM EST**: A user started a stack merge that includes this pull request via [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/128383). https://github.com/llvm/llvm-project/pull/128383

[clang] [llvm] AMDGPU: Move enqueued block handling into clang (PR #128519)

2025-02-24 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm updated https://github.com/llvm/llvm-project/pull/128519 >From 477a0f1dd42b20e5303a2b7ac68d2bf57ec7a47a Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Fri, 23 Dec 2022 16:55:40 -0500 Subject: [PATCH 1/2] AMDGPU: Move enqueued block handling into clang The previou

[libclc] [libclc] Move nan to the CLC library (PR #128521)

2025-02-24 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/128521 None >From 49a2cb5fc5a098dc16f9e348eba8a93b3433a379 Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Mon, 24 Feb 2025 15:11:07 + Subject: [PATCH] [libclc] Move nan to the CLC library --- libclc/clc

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-24 Thread Michael Klemm via cfe-commits
https://github.com/mjklemm approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/126026 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [Serialization] Support loading template specializations lazily (PR #119333)

2025-02-24 Thread Erich Keane via cfe-commits
@@ -1502,6 +1509,12 @@ enum DeclCode { /// An ImplicitConceptSpecializationDecl record. DECL_IMPLICIT_CONCEPT_SPECIALIZATION, + // A decls specilization record. + DECL_SPECIALIZATIONS, + + // A decls specilization record. + DECL_PARTIAL_SPECIALIZATIONS, + -

[clang] [clang-tools-extra] [Clang] Default the warning for chained comparison to an error. (PR #128145)

2025-02-24 Thread via cfe-commits
gmiller024 wrote: Hello, We are maintaining a downstream version of the monorepo based on the LLVM main branch. We have encountered validation failures with our language conformance test suites when merging in this upstream commit into our monorepo. We are seeing below errors: error: comparison

[libclc] [libclc] Move nan to the CLC library (PR #128521)

2025-02-24 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/128521 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [Clang] Default the warning for chained comparison to an error. (PR #128145)

2025-02-24 Thread Erich Keane via cfe-commits
erichkeane wrote: > Hello, We are maintaining a downstream version of the monorepo based on the > LLVM main branch. We have encountered validation failures with our language > conformance test suites when merging in this upstream commit into our > monorepo. We are seeing below errors: error: c

[clang] [lldb] [Serialization] Support loading template specializations lazily (PR #119333)

2025-02-24 Thread Erich Keane via cfe-commits
@@ -1502,6 +1509,12 @@ enum DeclCode { /// An ImplicitConceptSpecializationDecl record. DECL_IMPLICIT_CONCEPT_SPECIALIZATION, + // A decls specilization record. erichkeane wrote: Note `specialization` is misspelled in this comment and the one below. htt

[clang] [lld] [llvm] Integrated Distributed ThinLTO (DTLTO): Initial support (PR #126654)

2025-02-24 Thread Teresa Johnson via cfe-commits
teresajohnson wrote: > > Thanks for the heads up, so I should not do a detailed code review for > > PR127749? Is there more info on what you mean by a "no-backend DTLTO"? > > Yes, I think for now it will be better to understand the design of the > current code review that Ben submitted but not

[clang] [CIR] Better handling of `void` function return (PR #128089)

2025-02-24 Thread David Olsen via cfe-commits
@@ -331,9 +335,38 @@ FuncType FuncType::clone(TypeRange inputs, TypeRange results) const { return get(llvm::to_vector(inputs), results[0], isVarArg()); } -mlir::ParseResult parseFuncTypeArgs(mlir::AsmParser &p, -llvm::SmallVector ¶ms, -

[libclc] 2dfb29a - [libclc] Move nan to the CLC library (#128521)

2025-02-24 Thread via cfe-commits
Author: Fraser Cormack Date: 2025-02-24T15:41:31Z New Revision: 2dfb29a9b2f63e8dcbace2bf9b73ecc770f62b4d URL: https://github.com/llvm/llvm-project/commit/2dfb29a9b2f63e8dcbace2bf9b73ecc770f62b4d DIFF: https://github.com/llvm/llvm-project/commit/2dfb29a9b2f63e8dcbace2bf9b73ecc770f62b4d.diff LOG

[libclc] [libclc] Move nan to the CLC library (PR #128521)

2025-02-24 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck closed https://github.com/llvm/llvm-project/pull/128521 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement the core language parts of P2786 - Trivial relocation (PR #127636)

2025-02-24 Thread via cfe-commits
@@ -7258,6 +7261,228 @@ void Sema::CheckCompletedCXXClass(Scope *S, CXXRecordDecl *Record) { } } +static bool hasSuitableConstructorForRelocation(CXXRecordDecl *D, +bool AllowUserDefined) { + assert(D->hasDefinition() && !D->

[clang] [flang] [flang][Driver] Add support of -fd-lines-as-comments and -fd-lines-as-code flags (PR #127605)

2025-02-24 Thread Tarun Prabhu via cfe-commits
https://github.com/tarunprabhu approved this pull request. Thanks for seeing this through. https://github.com/llvm/llvm-project/pull/127605 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm

[clang] [Clang] Implement the core language parts of P2786 - Trivial relocation (PR #127636)

2025-02-24 Thread via cfe-commits
@@ -1826,6 +1827,12 @@ The following type trait primitives are supported by Clang. Those traits marked functionally equivalent to copying the underlying bytes and then dropping the source object on the floor. This is true of trivial types and types which were made trivia

[clang] [CIR] Better handling of `void` function return (PR #128089)

2025-02-24 Thread Erich Keane via cfe-commits
@@ -331,9 +335,38 @@ FuncType FuncType::clone(TypeRange inputs, TypeRange results) const { return get(llvm::to_vector(inputs), results[0], isVarArg()); } -mlir::ParseResult parseFuncTypeArgs(mlir::AsmParser &p, -llvm::SmallVector ¶ms, -

[clang] [HLSL] Allow arrays to be returned by value in HLSL (PR #127896)

2025-02-24 Thread Chris B via cfe-commits
@@ -2803,6 +2803,10 @@ class ASTContext : public RefCountedBase { return getUnqualifiedArrayType(T, Quals); } + // Determine whether an array is a valid return type + // Array is a valid return type for HLSL + bool isReturnableArrayType() const { return getLangOpts().

[clang] [HLSL] Allow arrays to be returned by value in HLSL (PR #127896)

2025-02-24 Thread Chris B via cfe-commits
@@ -20760,7 +20761,8 @@ ExprResult RebuildUnknownAnyExpr::VisitCallExpr(CallExpr *E) { ExprResult RebuildUnknownAnyExpr::VisitObjCMessageExpr(ObjCMessageExpr *E) { // Verify that this is a legal result type of a call. - if (DestType->isArrayType() || DestType->isFunctionTy

[clang] 538b898 - [RISCV] Add Qualcomm uC Xqcilia (Large Immediate Arithmetic) extension (#124706)

2025-02-24 Thread via cfe-commits
Author: quic_hchandel Date: 2025-02-24T08:04:29-08:00 New Revision: 538b898a836ac6efc3b0ec12cf27b511608d2e64 URL: https://github.com/llvm/llvm-project/commit/538b898a836ac6efc3b0ec12cf27b511608d2e64 DIFF: https://github.com/llvm/llvm-project/commit/538b898a836ac6efc3b0ec12cf27b511608d2e64.diff

[clang] [HLSL] Allow arrays to be returned by value in HLSL (PR #127896)

2025-02-24 Thread Chris B via cfe-commits
@@ -2803,6 +2803,10 @@ class ASTContext : public RefCountedBase { return getUnqualifiedArrayType(T, Quals); } + // Determine whether an array is a valid return type + // Array is a valid return type for HLSL + bool isReturnableArrayType() const { return getLangOpts().

[clang] [llvm] [CMake][Release] Enable bolt optimization for clang on Linux (PR #128090)

2025-02-24 Thread Tobias Hieta via cfe-commits
https://github.com/tru approved this pull request. https://github.com/llvm/llvm-project/pull/128090 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Updating to include gcc-toolsets 13 and 14 (PR #128438)

2025-02-24 Thread Bill Blum via cfe-commits
https://github.com/roadswitcher updated https://github.com/llvm/llvm-project/pull/128438 >From a0eb0bcc139d23294f8013da2dcc15adcaa8ef55 Mon Sep 17 00:00:00 2001 From: Bill Blum Date: Sun, 23 Feb 2025 16:54:11 -0500 Subject: [PATCH] Updating to include gcc-toolsets 13 and 14 since they are now

[clang] [llvm] [RISCV] Add Qualcomm uC Xqcilia (Large Immediate Arithmetic) extension (PR #124706)

2025-02-24 Thread Sam Elliott via cfe-commits
https://github.com/lenary closed https://github.com/llvm/llvm-project/pull/124706 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang][OpenMP] Upstream first part of `do concurrent` mapping (PR #126026)

2025-02-24 Thread Tom Eccles via cfe-commits
https://github.com/tblah approved this pull request. LGTM thanks https://github.com/llvm/llvm-project/pull/126026 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement CWG 2628 "Implicit deduction guides should propagate constraints" (PR #111143)

2025-02-24 Thread Haojian Wu via cfe-commits
@@ -390,7 +393,7 @@ struct ConvertConstructorToDeductionGuideTransform { /*EvaluateConstraint=*/false); } -assert(NewParam->getTemplateDepth() == 0 && +assert(getDepthAndIndex(NewParam).first == 0 && hokein wrote: A heads

[clang] [clang] Updating to include gcc-toolsets 13 and 14 (PR #128438)

2025-02-24 Thread Bill Blum via cfe-commits
https://github.com/roadswitcher updated https://github.com/llvm/llvm-project/pull/128438 >From a0eb0bcc139d23294f8013da2dcc15adcaa8ef55 Mon Sep 17 00:00:00 2001 From: Bill Blum Date: Sun, 23 Feb 2025 16:54:11 -0500 Subject: [PATCH] Updating to include gcc-toolsets 13 and 14 since they are now

[clang] [clang][HIP] Make some math not not work with AMDGCN SPIR-V (PR #128360)

2025-02-24 Thread Matt Arsenault via cfe-commits
@@ -14,6 +14,12 @@ #include "hip/hip_version.h" #endif // __has_include("hip/hip_version.h") +#ifdef __SPIRV__ +#define __PRIVATE_AS __attribute__((address_space(0))) +#else +#define __PRIVATE_AS __attribute__((address_space(5))) +#endif arsenm wrote: ```sugg

[clang] [clang] Updating to include gcc-toolsets 13 and 14 (PR #128438)

2025-02-24 Thread Bill Blum via cfe-commits
https://github.com/roadswitcher updated https://github.com/llvm/llvm-project/pull/128438 >From ed6298c9cf0a778411067d7a10c9a9c54fbb6266 Mon Sep 17 00:00:00 2001 From: Bill Blum Date: Sun, 23 Feb 2025 16:54:11 -0500 Subject: [PATCH] Updating to include gcc-toolsets 13 and 14 since they are now

[clang] [clang][HIP] Make some math not not work with AMDGCN SPIR-V (PR #128360)

2025-02-24 Thread Matt Arsenault via cfe-commits
@@ -33,6 +33,13 @@ #define __DEVICE__ static __device__ inline __attribute__((always_inline)) #endif +#pragma push_macro("__PRIVATE_AS") + +#ifdef __SPIRV__ +#define __PRIVATE_AS __attribute__((address_space(0))) +#else +#define __PRIVATE_AS __attribute__((address_space(5))) +

[clang] [clang-tools-extra] [clang-tidy][NFC] Expose HeuristicResolver::lookupDependentName() and use it in StandaloneEmptyCheck (PR #128391)

2025-02-24 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/128391 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 7a4cb9b - [clang-tidy][NFC] Expose HeuristicResolver::lookupDependentName() and use it in StandaloneEmptyCheck (#128391)

2025-02-24 Thread via cfe-commits
Author: Nathan Ridge Date: 2025-02-24T11:31:46-05:00 New Revision: 7a4cb9bac50c8c19ec0d4ab7f186ef086064a549 URL: https://github.com/llvm/llvm-project/commit/7a4cb9bac50c8c19ec0d4ab7f186ef086064a549 DIFF: https://github.com/llvm/llvm-project/commit/7a4cb9bac50c8c19ec0d4ab7f186ef086064a549.diff

[clang] [clang-tools-extra] [clang][NFC] Remove CXXRecordDecl::lookupDependentName() and its helpers (PR #128392)

2025-02-24 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited https://github.com/llvm/llvm-project/pull/128392 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Make memory representation of boolean vectors in HLSL, vectors of i32. Add support for boolean swizzling. (PR #123977)

2025-02-24 Thread Sarah Spall via cfe-commits
https://github.com/spall updated https://github.com/llvm/llvm-project/pull/123977 >From 50f8b16bf83d70cc37f2ac7e70c9195a4c4cda02 Mon Sep 17 00:00:00 2001 From: Sarah Spall Date: Thu, 16 Jan 2025 01:32:25 + Subject: [PATCH 01/14] wip --- clang/lib/CodeGen/CGExpr.cpp | 19

[clang] [llvm] [HLSL] [DXIL] Implement the AddUint64 HLSL function and the UAddc DXIL op (PR #127137)

2025-02-24 Thread Farzon Lotfi via cfe-commits
farzonl wrote: Justin's change [merged](https://github.com/llvm/llvm-project/pull/128247/files) this morning. After you rebase I'll take a look. https://github.com/llvm/llvm-project/pull/127137 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] Reland "[HLSL] Implement the reflect HLSL function" (PR #125599)

2025-02-24 Thread Deric Cheung via cfe-commits
https://github.com/Icohedron updated https://github.com/llvm/llvm-project/pull/125599 >From ff7e6425913d77a66ff47335b6ee0f84f2741034 Mon Sep 17 00:00:00 2001 From: Icohedron Date: Mon, 3 Feb 2025 23:10:16 + Subject: [PATCH 1/5] Reapply "Reland "[HLSL] Implement the `reflect` HLSL function"

[clang] [HLSL] Make memory representation of boolean vectors in HLSL, vectors of i32. Add support for boolean swizzling. (PR #123977)

2025-02-24 Thread Farzon Lotfi via cfe-commits
@@ -410,6 +410,12 @@ VectorType::VectorType(TypeClass tc, QualType vecType, unsigned nElements, VectorTypeBits.NumElements = nElements; } +bool Type::isPackedVectorBoolType(const ASTContext &ctx) const { + if (ctx.getLangOpts().HLSL) farzonl wrote: This m

[clang] 63af271 - [NFC] [test] assert padding in memtag-globals test (#128259)

2025-02-24 Thread via cfe-commits
Author: Florian Mayer Date: 2025-02-24T09:03:08-08:00 New Revision: 63af27190be70c3ea94bf913b93cb82db9eca25c URL: https://github.com/llvm/llvm-project/commit/63af27190be70c3ea94bf913b93cb82db9eca25c DIFF: https://github.com/llvm/llvm-project/commit/63af27190be70c3ea94bf913b93cb82db9eca25c.diff

[clang] [NFC] [test] assert padding in memtag-globals test (PR #128259)

2025-02-24 Thread Florian Mayer via cfe-commits
https://github.com/fmayer closed https://github.com/llvm/llvm-project/pull/128259 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [MTE] generalize overalignment / size of MTE globals (PR #121957)

2025-02-24 Thread Florian Mayer via cfe-commits
https://github.com/fmayer updated https://github.com/llvm/llvm-project/pull/121957 >From 2feb85c15f64546cb6874e1ca0a1310bd1e1bedd Mon Sep 17 00:00:00 2001 From: Florian Mayer Date: Tue, 7 Jan 2025 07:57:09 -0800 Subject: [PATCH 1/5] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UTF

[clang] [HLSL] Allow arrays to be returned by value in HLSL (PR #127896)

2025-02-24 Thread Sarah Spall via cfe-commits
https://github.com/spall updated https://github.com/llvm/llvm-project/pull/127896 >From 362b64d31e5f70e4a26ea04c99a58fd5f5ca50ca Mon Sep 17 00:00:00 2001 From: Sarah Spall Date: Fri, 14 Feb 2025 12:59:56 -0800 Subject: [PATCH 1/3] Allow arrays to be returned by value in HLSL + test --- clang/

[clang] [llvm] [HLSL] [DXIL] Implement the AddUint64 HLSL function and the UAddc DXIL op (PR #127137)

2025-02-24 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,72 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 +; RUN: opt -S -scalarizer -dxil-op-lower -mtriple=dxil-pc-shadermodel6.3-library %s | FileCheck %s + +; CHECK: %dx.types.i32c = type { i32, i1 } + +define noundef i

[clang] [llvm] [HLSL] [DXIL] Implement the AddUint64 HLSL function and the UAddc DXIL op (PR #127137)

2025-02-24 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/127137 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] [DXIL] Implement the AddUint64 HLSL function and the UAddc DXIL op (PR #127137)

2025-02-24 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/127137 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Make memory representation of boolean vectors in HLSL, vectors of i32. Add support for boolean swizzling. (PR #123977)

2025-02-24 Thread Farzon Lotfi via cfe-commits
@@ -166,3 +206,99 @@ int AssignInt(int V){ X.x = V.x + V.x; return X; } + +// CHECK-LABEL: AssignBool +// CHECK: [[VAddr:%.*]] = alloca i32, align 4 +// CHECK-NEXT: [[XAddr:%.*]] = alloca i32, align 4 +// CHECK-NEXT: [[Zext:%.*]] = zext i1 %V to i32 +// CHECK-NEXT: store i3

[clang] [HLSL] Make memory representation of boolean vectors in HLSL, vectors of i32. Add support for boolean swizzling. (PR #123977)

2025-02-24 Thread Farzon Lotfi via cfe-commits
@@ -0,0 +1,111 @@ +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.3-library -emit-llvm -disable-llvm-passes -o - %s | FileCheck %s + +// CHECK: %struct.S = type { <2 x i32>, float } +// CHECK: [[ConstS:@.*]] = private unnamed_addr constant %struct.S { <

[clang] [clang] Fix ASTWriter crash after merging named enums (PR #114240)

2025-02-24 Thread Ilya Biryukov via cfe-commits
@@ -2551,18 +2551,7 @@ void Sema::MergeTypedefNameDecl(Scope *S, TypedefNameDecl *New, // Make the old tag definition visible. makeMergedDefinitionVisible(Hidden); - // If this was an unscoped enumeration, yank all of its enumerators - // out of the scop

[clang] a6abbe0 - [test] Remove `-emit-llvm` from the `and-errors.hlsl` test to avoid writing to a potentially write-protected directory (#128047)

2025-02-24 Thread via cfe-commits
Author: Deric Cheung Date: 2025-02-24T11:30:24-06:00 New Revision: a6abbe03094a7afc85d4d35c24e6cedd1cfc4ef2 URL: https://github.com/llvm/llvm-project/commit/a6abbe03094a7afc85d4d35c24e6cedd1cfc4ef2 DIFF: https://github.com/llvm/llvm-project/commit/a6abbe03094a7afc85d4d35c24e6cedd1cfc4ef2.diff

[clang] [test] Remove `-emit-llvm` from the `and-errors.hlsl` test to avoid writing to a potentially write-protected directory (PR #128047)

2025-02-24 Thread Chris B via cfe-commits
https://github.com/llvm-beanz closed https://github.com/llvm/llvm-project/pull/128047 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Make memory representation of boolean vectors in HLSL, vectors of i32. Add support for boolean swizzling. (PR #123977)

2025-02-24 Thread Sarah Spall via cfe-commits
@@ -410,6 +410,12 @@ VectorType::VectorType(TypeClass tc, QualType vecType, unsigned nElements, VectorTypeBits.NumElements = nElements; } +bool Type::isPackedVectorBoolType(const ASTContext &ctx) const { + if (ctx.getLangOpts().HLSL) spall wrote: The code

[clang] [HLSL] Make memory representation of boolean vectors in HLSL, vectors of i32. Add support for boolean swizzling. (PR #123977)

2025-02-24 Thread Sarah Spall via cfe-commits
https://github.com/spall updated https://github.com/llvm/llvm-project/pull/123977 >From 50f8b16bf83d70cc37f2ac7e70c9195a4c4cda02 Mon Sep 17 00:00:00 2001 From: Sarah Spall Date: Thu, 16 Jan 2025 01:32:25 + Subject: [PATCH 01/15] wip --- clang/lib/CodeGen/CGExpr.cpp | 19

[clang] [CIR] Add cir-opt tool to exercise CIR dialect parsing (PR #128254)

2025-02-24 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,32 @@ +get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS) +get_property(conversion_libs GLOBAL PROPERTY MLIR_CONVERSION_LIBS) + +include_directories(${LLVM_MAIN_SRC_DIR}/../mlir/include) +include_directories(${CMAKE_BINARY_DIR}/tools/mlir/include) + +add_clang

[clang] [CIR] Add cir-opt tool to exercise CIR dialect parsing (PR #128254)

2025-02-24 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor edited https://github.com/llvm/llvm-project/pull/128254 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Allow arrays to be returned by value in HLSL (PR #127896)

2025-02-24 Thread Chris B via cfe-commits
https://github.com/llvm-beanz approved this pull request. Looks reasonable https://github.com/llvm/llvm-project/pull/127896 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang modules] Setting `DebugCompilationDir` when it is safe to ignore current working directory (PR #128446)

2025-02-24 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/128446 >From c8eda8b9192cf4bdad4121063336beeb14cbe689 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Sun, 23 Feb 2025 16:47:18 -0800 Subject: [PATCH 1/2] Initial commit --- .../DependencyScanning/ModuleDepCollecto

[libclc] [libclc] Move log/log2/log10 to CLC library (PR #128540)

2025-02-24 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/128540 No changes to codegen for AMDGPU/Nvidia targets. Note that for simplicity this commit doesn't try to refactor or optimize the implementations. Notably, each log is only implementated for scalar types; vect

[clang] [clang modules] Setting `DebugCompilationDir` when it is safe to ignore current working directory (PR #128446)

2025-02-24 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu ready_for_review https://github.com/llvm/llvm-project/pull/128446 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Move log/log2/log10 to CLC library (PR #128540)

2025-02-24 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm commented: amdgpu should directly use llvm.log* and llvm.exp* for the f16 and f32 cases, still relying on the libraries for f64 https://github.com/llvm/llvm-project/pull/128540 ___ cfe-commits mailing list cfe-commits@lists.

[libclc] [libclc] Move log/log2/log10 to CLC library (PR #128540)

2025-02-24 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,339 @@ +/* + * Copyright (c) 2014,2015 Advanced Micro Devices, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restri

[clang] [Clang] Implement the core language parts of P2786 - Trivial relocation (PR #127636)

2025-02-24 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/127636 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] [libclc] Move log/log2/log10 to CLC library (PR #128540)

2025-02-24 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/128540 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add cir-opt tool to exercise CIR dialect parsing (PR #128254)

2025-02-24 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/128254 >From eaa4ca8f45d1a50d5a84ba4f701e6ad1957b549b Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Fri, 21 Feb 2025 15:47:32 -0800 Subject: [PATCH 1/3] [CIR] Add cir-opt tool to exercise CIR dialect parsing Par

[clang] [Wunsafe-buffer-usage] False positives for & expression indexing constant size array (arr[anything & 0]) (PR #112284)

2025-02-24 Thread Malavika Samak via cfe-commits
https://github.com/malavikasamak updated https://github.com/llvm/llvm-project/pull/112284 >From bf1f0b88c26cef3fd7eab40341558e1742c62321 Mon Sep 17 00:00:00 2001 From: MalavikaSamak Date: Fri, 11 Oct 2024 12:24:58 -0700 Subject: [PATCH 1/2] [Wunsafe-buffer-usage] False positives for & expressio

[clang] [clang modules] Setting `DebugCompilationDir` when it is safe to ignore current working directory (PR #128446)

2025-02-24 Thread Steven Wu via cfe-commits
cachemeifyoucan wrote: @adrian-prantl for the debug directory option since that might interact how debugger working with the option. I think we need a solution approved by debugger forks for how to avoid stamping CWD into debug info and when it is safe to do so (for example, we guarantee all

[clang] [Clang] Implement the core language parts of P2786 - Trivial relocation (PR #127636)

2025-02-24 Thread Mariya Podchishchaeva via cfe-commits
@@ -3808,13 +3867,38 @@ void Parser::ParseCXXMemberSpecification(SourceLocation RecordLoc, SourceLocation AbstractLoc; bool IsFinalSpelledSealed = false; bool IsAbstract = false; + SourceLocation TriviallyRelocatable; + SourceLocation Replacable; Fznam

[libclc] [libclc] Move log/log2/log10 to CLC library (PR #128540)

2025-02-24 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,339 @@ +/* + * Copyright (c) 2014,2015 Advanced Micro Devices, Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restri

[libclc] [libclc] Move log/log2/log10 to CLC library (PR #128540)

2025-02-24 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. Cleanups for another PR https://github.com/llvm/llvm-project/pull/128540 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-02-24 Thread Hubert Tong via cfe-commits
@@ -5442,6 +5442,155 @@ third argument, can only occur at file scope. a = b[i] * c[i] + e; } +Extensions for controlling atomic code generation += + +The ``[[clang::atomic]]`` statement attribute enables users to control ho

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

2025-02-24 Thread Hubert Tong via cfe-commits
@@ -5442,6 +5442,155 @@ third argument, can only occur at file scope. a = b[i] * c[i] + e; } +Extensions for controlling atomic code generation += + +The ``[[clang::atomic]]`` statement attribute enables users to control ho

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

2025-02-24 Thread Hubert Tong via cfe-commits
@@ -5442,6 +5442,155 @@ third argument, can only occur at file scope. a = b[i] * c[i] + e; } +Extensions for controlling atomic code generation += + +The ``[[clang::atomic]]`` statement attribute enables users to control ho

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

2025-02-24 Thread Hubert Tong via cfe-commits
@@ -5442,6 +5442,155 @@ third argument, can only occur at file scope. a = b[i] * c[i] + e; } +Extensions for controlling atomic code generation += + +The ``[[clang::atomic]]`` statement attribute enables users to control ho

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

2025-02-24 Thread Hubert Tong via cfe-commits
@@ -5442,6 +5442,155 @@ third argument, can only occur at file scope. a = b[i] * c[i] + e; } +Extensions for controlling atomic code generation += + +The ``[[clang::atomic]]`` statement attribute enables users to control ho

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

2025-02-24 Thread Hubert Tong via cfe-commits
@@ -5442,6 +5442,155 @@ third argument, can only occur at file scope. a = b[i] * c[i] + e; } +Extensions for controlling atomic code generation += + +The ``[[clang::atomic]]`` statement attribute enables users to control ho

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

2025-02-24 Thread Hubert Tong via cfe-commits
@@ -132,6 +132,12 @@ Attribute Changes in Clang This forces the global to be considered small or large in regards to the x86-64 code model, regardless of the code model specified for the compilation. +- Introduced a new statement attribute ``[[clang::atomic]]`` that enabl

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

2025-02-24 Thread Hubert Tong via cfe-commits
@@ -5442,6 +5442,155 @@ third argument, can only occur at file scope. a = b[i] * c[i] + e; } +Extensions for controlling atomic code generation += + +The ``[[clang::atomic]]`` statement attribute enables users to control ho

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

2025-02-24 Thread Hubert Tong via cfe-commits
@@ -5442,6 +5442,155 @@ third argument, can only occur at file scope. a = b[i] * c[i] + e; } +Extensions for controlling atomic code generation += + +The ``[[clang::atomic]]`` statement attribute enables users to control ho

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

2025-02-24 Thread Hubert Tong via cfe-commits
@@ -5442,6 +5442,155 @@ third argument, can only occur at file scope. a = b[i] * c[i] + e; } +Extensions for controlling atomic code generation += + +The ``[[clang::atomic]]`` statement attribute enables users to control ho

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

2025-02-24 Thread Hubert Tong via cfe-commits
@@ -5442,6 +5442,155 @@ third argument, can only occur at file scope. a = b[i] * c[i] + e; } +Extensions for controlling atomic code generation += + +The ``[[clang::atomic]]`` statement attribute enables users to control ho

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

2025-02-24 Thread Hubert Tong via cfe-commits
@@ -5442,6 +5442,155 @@ third argument, can only occur at file scope. a = b[i] * c[i] + e; } +Extensions for controlling atomic code generation += + +The ``[[clang::atomic]]`` statement attribute enables users to control ho

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

2025-02-24 Thread Hubert Tong via cfe-commits
@@ -5442,6 +5442,155 @@ third argument, can only occur at file scope. a = b[i] * c[i] + e; } +Extensions for controlling atomic code generation += + +The ``[[clang::atomic]]`` statement attribute enables users to control ho

[clang] [clang modules] Setting `DebugCompilationDir` when it is safe to ignore current working directory (PR #128446)

2025-02-24 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu edited https://github.com/llvm/llvm-project/pull/128446 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang modules] Setting `DebugCompilationDir` when it is safe to ignore current working directory (PR #128446)

2025-02-24 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu edited https://github.com/llvm/llvm-project/pull/128446 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Wunsafe-buffer-usage] False positives for & expression indexing constant size array (arr[anything & 0]) (PR #112284)

2025-02-24 Thread Malavika Samak via cfe-commits
@@ -462,8 +462,25 @@ AST_MATCHER(ArraySubscriptExpr, isSafeArraySubscript) { // bug if (ArrIdx.isNonNegative() && ArrIdx.getLimitedValue() < limit) return true; - } - return false; + } else if (const auto *BE = dyn_cast(IndexExpr)) { malavikasa

[clang] [llvm] Reland "[HLSL] Implement the reflect HLSL function" (PR #125599)

2025-02-24 Thread Deric Cheung via cfe-commits
https://github.com/Icohedron edited https://github.com/llvm/llvm-project/pull/125599 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4