[clang] 21fb19f - [clang-repl] : Fix clang-repl crash with --cuda flag (#136404)

2025-04-25 Thread via cfe-commits
Author: Anutosh Bhat Date: 2025-04-26T09:46:26+03:00 New Revision: 21fb19f3b5d572f608e959af895d781b9b24fbbd URL: https://github.com/llvm/llvm-project/commit/21fb19f3b5d572f608e959af895d781b9b24fbbd DIFF: https://github.com/llvm/llvm-project/commit/21fb19f3b5d572f608e959af895d781b9b24fbbd.diff

[clang] [clang-repl] : Fix clang-repl crash with --cuda flag (PR #136404)

2025-04-25 Thread Vassil Vassilev via cfe-commits
https://github.com/vgvassilev closed https://github.com/llvm/llvm-project/pull/136404 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream enum support (PR #136807)

2025-04-25 Thread Ankur Ahir via cfe-commits
https://github.com/Ankur-0429 updated https://github.com/llvm/llvm-project/pull/136807 >From 44a384b8ad774939c7664c8a476e852f1d4a7341 Mon Sep 17 00:00:00 2001 From: Ankur Ahir Date: Tue, 22 Apr 2025 20:04:34 -0700 Subject: [PATCH 1/7] Upstream enum support --- clang/lib/CIR/CodeGen/CIRGenModu

[clang] [CIR] Upstream enum support (PR #136807)

2025-04-25 Thread Ankur Ahir via cfe-commits
https://github.com/Ankur-0429 updated https://github.com/llvm/llvm-project/pull/136807 >From 44a384b8ad774939c7664c8a476e852f1d4a7341 Mon Sep 17 00:00:00 2001 From: Ankur Ahir Date: Tue, 22 Apr 2025 20:04:34 -0700 Subject: [PATCH 1/6] Upstream enum support --- clang/lib/CIR/CodeGen/CIRGenModu

[clang] [flang] [llvm] [TargetVerifier][AMDGPU] Add TargetVerifier. (PR #123609)

2025-04-25 Thread via cfe-commits
https://github.com/jofrn updated https://github.com/llvm/llvm-project/pull/123609 >From 210b6d80bcfbbcd216f98199df386280724561e2 Mon Sep 17 00:00:00 2001 From: jofernau Date: Mon, 20 Jan 2025 04:51:26 -0800 Subject: [PATCH 01/15] [TargetVerifier][AMDGPU] Add TargetVerifier. This pass verifies

[clang] [flang] [llvm] [TargetVerifier][AMDGPU] Add TargetVerifier. (PR #123609)

2025-04-25 Thread via cfe-commits
https://github.com/jofrn updated https://github.com/llvm/llvm-project/pull/123609 >From 210b6d80bcfbbcd216f98199df386280724561e2 Mon Sep 17 00:00:00 2001 From: jofernau Date: Mon, 20 Jan 2025 04:51:26 -0800 Subject: [PATCH 01/14] [TargetVerifier][AMDGPU] Add TargetVerifier. This pass verifies

[clang] [Clang][CodeGen] Add metadata for load from reference (PR #98746)

2025-04-25 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: > Do we have a ubsan check for this? We have a ubsan check on deref. I think it is enough. https://github.com/llvm/llvm-project/pull/98746 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] [CIR] Upstream initial support for fixed size VectorType (PR #136488)

2025-04-25 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/136488 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 0af2614 - [clang-format][NFC] Use UnwrappedLineParser::eof() whenever possible

2025-04-25 Thread Owen Pan via cfe-commits
Author: Owen Pan Date: 2025-04-25T22:16:59-07:00 New Revision: 0af26149e2b26064cf5df4e02dd6535e124ac707 URL: https://github.com/llvm/llvm-project/commit/0af26149e2b26064cf5df4e02dd6535e124ac707 DIFF: https://github.com/llvm/llvm-project/commit/0af26149e2b26064cf5df4e02dd6535e124ac707.diff LOG:

[clang] 4eb66f7 - [clang][bytecode] Allow memory leaks before C++20 (#137445)

2025-04-25 Thread via cfe-commits
Author: Timm Baeder Date: 2025-04-26T07:13:44+02:00 New Revision: 4eb66f7462d0ea89f9354df1fcb63cdb614adc28 URL: https://github.com/llvm/llvm-project/commit/4eb66f7462d0ea89f9354df1fcb63cdb614adc28 DIFF: https://github.com/llvm/llvm-project/commit/4eb66f7462d0ea89f9354df1fcb63cdb614adc28.diff L

[clang] [clang][bytecode] Allow memory leaks before C++20 (PR #137445)

2025-04-25 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/137445 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode] Diagnose PointerToIntegral casts (PR #137444)

2025-04-25 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/137444 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b8f5e3c - [clang][bytecode] Diagnose PointerToIntegral casts (#137444)

2025-04-25 Thread via cfe-commits
Author: Timm Baeder Date: 2025-04-26T07:11:30+02:00 New Revision: b8f5e3c573577a388f2674a88901faf760bca8a6 URL: https://github.com/llvm/llvm-project/commit/b8f5e3c573577a388f2674a88901faf760bca8a6 DIFF: https://github.com/llvm/llvm-project/commit/b8f5e3c573577a388f2674a88901faf760bca8a6.diff L

[clang] Silence spurious -Wnontrivial-memcall warnings in C mode (PR #137429)

2025-04-25 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik commented: This should have a release note. https://github.com/llvm/llvm-project/pull/137429 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 58d60a4 - [clang][bytecode] Diagnose destroying already dead locals (#137357)

2025-04-25 Thread via cfe-commits
Author: Timm Baeder Date: 2025-04-26T05:03:28+02:00 New Revision: 58d60a4df92d57941f6d47d46bd5025fe6298c93 URL: https://github.com/llvm/llvm-project/commit/58d60a4df92d57941f6d47d46bd5025fe6298c93 DIFF: https://github.com/llvm/llvm-project/commit/58d60a4df92d57941f6d47d46bd5025fe6298c93.diff L

[clang] [clang][bytecode] Check for dummy pointers when calling pseudo dtors (PR #137437)

2025-04-25 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `openmp-s390x-linux` running on `systemz-1` while building `clang` at step 6 "test-openmp". Full details are available at: https://lab.llvm.org/buildbot/#/builders/88/builds/10929 Here is the relevant piece of the build log f

[clang] [clang][bytecode] Check for dummy pointers when calling pseudo dtors (PR #137437)

2025-04-25 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/137437 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] ef87c34 - [clang][bytecode] Check for dummy pointers when calling pseudo dtors (#137437)

2025-04-25 Thread via cfe-commits
Author: Timm Baeder Date: 2025-04-26T05:47:54+02:00 New Revision: ef87c3421c188fb17bf2d25c61d6a58b9f758bf5 URL: https://github.com/llvm/llvm-project/commit/ef87c3421c188fb17bf2d25c61d6a58b9f758bf5 DIFF: https://github.com/llvm/llvm-project/commit/ef87c3421c188fb17bf2d25c61d6a58b9f758bf5.diff L

[clang] Silence spurious -Wnontrivial-memcall warnings in C mode (PR #137429)

2025-04-25 Thread Oliver Hunt via cfe-commits
@@ -0,0 +1,42 @@ +// RUN: %clang_cc1 -triple arm64-apple-ios -fptrauth-calls -fptrauth-intrinsics -fsyntax-only -verify %s +// RUN: %clang_cc1 -triple aarch64-linux-gnu -fptrauth-calls -fptrauth-intrinsics -fsyntax-only -verify %s + ojhunt wrote: Given there ar

[clang] [clang][bytecode] Check for dummy pointers when calling pseudo dtors (PR #137437)

2025-04-25 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/137437 None >From 043c655ece82e3a167745000a102911cee56143f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 26 Apr 2025 04:53:56 +0200 Subject: [PATCH] [clang][bytecode] Check for dummy pointer

[clang] [clang][bytecode] Check for dummy pointers when calling pseudo dtors (PR #137437)

2025-04-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/137437.diff 3 Files Affected: - (modified) clang/lib/AST/ByteCode/Interp.cpp (+1-2) - (modified) clang/lib/AST/ByteCode/Interp.h (+2) - (modified

[clang] [clang][Dependency Scanning] Report Exported Modules during Scanning (PR #137421)

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

[clang] [clang][bytecode] Diagnose destroying already dead locals (PR #137357)

2025-04-25 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/137357 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [DXIL] Remove incompatible metadata types when preparing DXIL. (PR #136386)

2025-04-25 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,39 @@ +; RUN: opt -S --dxil-prepare %s | FileCheck %s + +; This test tests the whitelist inside of DxilPrepare.cpp. +; It ensures that certain metadata nodes are removed that aren't +; in the whitelist, and that certain nodes may remain that +; are on the whitelist. + +

[clang] [clang-format] Annotate tok::star in a*b*c as BinaryOperator (PR #137433)

2025-04-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fix #137400 --- Full diff: https://github.com/llvm/llvm-project/pull/137433.diff 2 Files Affected: - (modified) clang/lib/Format/TokenAnnotator.cpp (+5-1) - (modified) clang/unittests/Format/TokenAnnota

[clang] [CIR] Upstream initial support for switch statements (PR #137106)

2025-04-25 Thread Andy Kaylor via cfe-commits
@@ -753,6 +755,221 @@ def ScopeOp : CIR_Op<"scope", [ ]; } +//===--===// +// SwitchOp +//===--===// + +def CaseOpKind_DT : I32EnumAttrCase<

[clang] [clang-format] Annotate tok::star in a*b*c as BinaryOperator (PR #137433)

2025-04-25 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/137433 Fix #137400 >From 62b436a3b71dd7109977b95afeda3db15e37d74c Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 25 Apr 2025 19:24:44 -0700 Subject: [PATCH] [clang-format] Annotate tok::star in a*b*c as BinaryOpera

[clang] Silence spurious -Wnontrivial-memcall warnings in C mode (PR #137429)

2025-04-25 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak ready_for_review https://github.com/llvm/llvm-project/pull/137429 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][headers][Apple] Don't include_next float.h to avoid an unnecessary module dependency (PR #137432)

2025-04-25 Thread Ian Anderson via cfe-commits
ian-twilightcoder wrote: This was originally added in d93779d / d89a1eb (can't find either of these in Phabricator) for `_HAS_SUBNORM`, but that's since been obsoleted by . So including this header just causes an unnecessary include and module build of Apple's

[clang] [clang][headers][Apple] Don't include_next float.h to avoid an unnecessary module dependency (PR #137432)

2025-04-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: Ian Anderson (ian-twilightcoder) Changes float.h doesn't define anything in Apple's SDKs that the clang float.h doesn't undefine, so all the include_next does is add an unnecessary module dependency. Skip the include_next and comple

[clang] [clang][headers][Apple] Don't include_next float.h to avoid an unnecessary module dependency (PR #137432)

2025-04-25 Thread Ian Anderson via cfe-commits
https://github.com/ian-twilightcoder created https://github.com/llvm/llvm-project/pull/137432 float.h doesn't define anything in Apple's SDKs that the clang float.h doesn't undefine, so all the include_next does is add an unnecessary module dependency. Skip the include_next and completely shad

[clang] [Clang][NFC] Const correctness fix for range based for loop (PR #137431)

2025-04-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Shafik Yaghmour (shafik) Changes Static analysis flagged that we did not make const a item declaration b/c we did not modify it all during the loop. --- Full diff: https://github.com/llvm/llvm-project/pull/137431.diff 1 Files Affected:

[clang] [Clang][NFC] Const correctness fix for range based for loop (PR #137431)

2025-04-25 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik created https://github.com/llvm/llvm-project/pull/137431 Static analysis flagged that we did not make const a item declaration b/c we did not modify it all during the loop. >From 6b1e4f4c170c3f15697209f385397f295d15d2db Mon Sep 17 00:00:00 2001 From: Shafik Yaghmour

[clang] cfc5baf - [RISCV] SiFive CLIC Support (#132481)

2025-04-25 Thread via cfe-commits
Author: Sam Elliott Date: 2025-04-25T17:12:27-07:00 New Revision: cfc5baf6e6fc083fdbb584534a3fb8ea289752d2 URL: https://github.com/llvm/llvm-project/commit/cfc5baf6e6fc083fdbb584534a3fb8ea289752d2 DIFF: https://github.com/llvm/llvm-project/commit/cfc5baf6e6fc083fdbb584534a3fb8ea289752d2.diff L

[clang] Silence spurious -Wnontrivial-memcall warnings in C mode (PR #137429)

2025-04-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Akira Hatanaka (ahatanak) Changes clang currently issues a warning when memset is used on a struct that contains an address-discriminated pointer field, even though this is entirely valid behavior. For example: ``` struct S { int * __

[clang] [lld] [llvm] [mlir] [NFC] Use more isa and isa_and_nonnull instead dyn_cast for predicates (PR #137393)

2025-04-25 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata approved this pull request. https://github.com/llvm/llvm-project/pull/137393 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [llvm] [X86] Implement disabling APX relocations and EPGR/NDD instrs for relocations (PR #136660)

2025-04-25 Thread Phoebe Wang via cfe-commits
phoebewang wrote: > > Any comments? > > Still not understand the requirement... I'm confused by the test cases too. I understood the code as we replace the EGPR or NDD instructions with non-APX ones, which meets my expection. But the option and tests are in MC phase, which means instructions

[clang] [clang-format] Correctly handle C# new modifier (PR #137430)

2025-04-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fix #75815 --- Full diff: https://github.com/llvm/llvm-project/pull/137430.diff 3 Files Affected: - (modified) clang/lib/Format/UnwrappedLineParser.cpp (+7-1) - (modified) clang/unittests/Format/FormatT

[clang] [clang-format] Correctly handle C# new modifier (PR #137430)

2025-04-25 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/137430 Fix #75815 >From f02cb0bca31a46e815fa3bc8df8a18d9757e5020 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 25 Apr 2025 18:41:48 -0700 Subject: [PATCH] [clang-format] Correctly handle C# new modifier Fix #7581

[clang] Silence spurious -Wnontrivial-memcall warnings in C mode (PR #137429)

2025-04-25 Thread Akira Hatanaka via cfe-commits
https://github.com/ahatanak created https://github.com/llvm/llvm-project/pull/137429 clang currently issues a warning when memset is used on a struct that contains an address-discriminated pointer field, even though this is entirely valid behavior. For example: ``` struct S { int * __ptrau

[clang] [lld] [llvm] [mlir] [NFC] Use more isa and isa_and_nonnull instead dyn_cast for predicates (PR #137393)

2025-04-25 Thread Jakub Kuderski via cfe-commits
https://github.com/kuhar approved this pull request. https://github.com/llvm/llvm-project/pull/137393 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Dependency Scanning] Report Exported Modules during Scanning (PR #137421)

2025-04-25 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: Note to reviewers: `clang/test/ClangScanDeps/export.c` is the new test. The rest of the test changes are updates. https://github.com/llvm/llvm-project/pull/137421 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang] Fix crash with -ast-dump=json (PR #137324)

2025-04-25 Thread Akira Hatanaka via cfe-commits
@@ -211,6 +211,8 @@ Non-comprehensive list of changes in this release - Added `__builtin_elementwise_exp10`. - For AMDPGU targets, added `__builtin_v_cvt_off_f32_i4` that maps to the `v_cvt_off_f32_i4` instruction. - Added `__builtin_elementwise_minnum` and `__builtin_elementw

[clang] [llvm] [DXIL] Remove incompatible metadata types when preparing DXIL. (PR #136386)

2025-04-25 Thread Justin Bogner via cfe-commits
https://github.com/bogner commented: Description / commit message needs to be updated to match how this ended up, but otherwise this is looking pretty good. A couple of minor comments inline. https://github.com/llvm/llvm-project/pull/136386 ___ cfe-co

[clang] [llvm] [RISCV] SiFive CLIC Support (PR #132481)

2025-04-25 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `llvm-clang-x86_64-expensive-checks-debian` running on `gribozavr4` while building `clang,llvm` at step 6 "test-build-unified-tree-check-all". Full details are available at: https://lab.llvm.org/buildbot/#/builders/16/builds/1

[clang] Fix crash with -ast-dump=json (PR #137324)

2025-04-25 Thread Akira Hatanaka via cfe-commits
@@ -367,9 +367,11 @@ void MangleContext::mangleObjCMethodName(const ObjCMethodDecl *MD, } OS << (MD->isInstanceMethod() ? '-' : '+') << '['; if (const auto *CID = MD->getCategory()) { -OS << CID->getClassInterface()->getName(); -if (includeCategoryNamespace) { -

[clang] [llvm] [mlir] [AMDGPU] Add a new amdgcn.load.to.lds intrinsic (PR #137425)

2025-04-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-amdgpu Author: Krzysztof Drewniak (krzysz00) Changes This PR adds a amdgns_load_to_lds intrinsic that abstracts over loads to LDS from global (address space 1) pointers and buffer fat pointers (address space 7), since they use the saem API and

[clang] [llvm] [mlir] [AMDGPU] Add a new amdgcn.load.to.lds intrinsic (PR #137425)

2025-04-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-mlir Author: Krzysztof Drewniak (krzysz00) Changes This PR adds a amdgns_load_to_lds intrinsic that abstracts over loads to LDS from global (address space 1) pointers and buffer fat pointers (address space 7), since they use the saem API and "gather fr

[clang] [llvm] [mlir] [AMDGPU] Add a new amdgcn.load.to.lds intrinsic (PR #137425)

2025-04-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-mlir-llvm Author: Krzysztof Drewniak (krzysz00) Changes This PR adds a amdgns_load_to_lds intrinsic that abstracts over loads to LDS from global (address space 1) pointers and buffer fat pointers (address space 7), since they use the saem API and "gath

[clang] [llvm] [mlir] [AMDGPU] Add a new amdgcn.load.to.lds intrinsic (PR #137425)

2025-04-25 Thread Krzysztof Drewniak via cfe-commits
https://github.com/krzysz00 created https://github.com/llvm/llvm-project/pull/137425 This PR adds a amdgns_load_to_lds intrinsic that abstracts over loads to LDS from global (address space 1) pointers and buffer fat pointers (address space 7), since they use the saem API and "gather from a poi

[clang] [CIR] Upstream initial support for switch statements (PR #137106)

2025-04-25 Thread via cfe-commits
@@ -600,3 +721,99 @@ mlir::LogicalResult CIRGenFunction::emitWhileStmt(const WhileStmt &s) { terminateBody(builder, whileOp.getBody(), getLoc(s.getEndLoc())); return mlir::success(); } + +mlir::LogicalResult CIRGenFunction::emitSwitchBody(const Stmt *s) { + // It is rare

[clang] [clang][Dependency Scanning] Report Exported Modules during Scanning (PR #137421)

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

[clang] [llvm] [DXIL] Remove incompatible metadata types when preparing DXIL. (PR #136386)

2025-04-25 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,39 @@ +; RUN: opt -S --dxil-prepare %s | FileCheck %s + +; This test tests the whitelist inside of DxilPrepare.cpp. +; It ensures that certain metadata nodes are removed that aren't +; in the whitelist, and that certain nodes may remain that +; are on the whitelist. + +

[clang] [llvm] [RISCV] SiFive CLIC Support (PR #132481)

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

[clang] [llvm] [DXIL] Remove incompatible metadata types when preparing DXIL. (PR #136386)

2025-04-25 Thread Justin Bogner via cfe-commits
@@ -0,0 +1,39 @@ +; RUN: opt -S --dxil-prepare %s | FileCheck %s + +; This test tests the whitelist inside of DxilPrepare.cpp. +; It ensures that certain metadata nodes are removed that aren't +; in the whitelist, and that certain nodes may remain that +; are on the whitelist. ---

[clang] [llvm] [DXIL] Remove incompatible metadata types when preparing DXIL. (PR #136386)

2025-04-25 Thread Justin Bogner via cfe-commits
https://github.com/bogner edited https://github.com/llvm/llvm-project/pull/136386 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Dependency Scanning] Report Exported Modules during Scanning (PR #137421)

2025-04-25 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu created https://github.com/llvm/llvm-project/pull/137421 We would like to report, for a module, what modules it exports during dependency scanning. This PR implements this reporting by augmenting `ModuleDep`'s `ClangModuleDeps` variable. `ClangModuleDeps` now conta

[clang] [CIR] Upstream initial support for switch statements (PR #137106)

2025-04-25 Thread Andy Kaylor via cfe-commits
@@ -753,6 +755,221 @@ def ScopeOp : CIR_Op<"scope", [ ]; } +//===--===// +// SwitchOp +//===--===// + +def CaseOpKind_DT : I32EnumAttrCase<

[clang] [CIR] Upstream initial support for switch statements (PR #137106)

2025-04-25 Thread Andy Kaylor via cfe-commits
@@ -753,6 +755,221 @@ def ScopeOp : CIR_Op<"scope", [ ]; } +//===--===// +// SwitchOp +//===--===// + +def CaseOpKind_DT : I32EnumAttrCase<

[clang] [CIR] Upstream initial support for switch statements (PR #137106)

2025-04-25 Thread Andy Kaylor via cfe-commits
@@ -753,6 +755,221 @@ def ScopeOp : CIR_Op<"scope", [ ]; } +//===--===// +// SwitchOp +//===--===// + +def CaseOpKind_DT : I32EnumAttrCase<

[clang] [CIR] Upstream initial support for switch statements (PR #137106)

2025-04-25 Thread Andy Kaylor via cfe-commits
@@ -753,6 +755,221 @@ def ScopeOp : CIR_Op<"scope", [ ]; } +//===--===// +// SwitchOp +//===--===// + +def CaseOpKind_DT : I32EnumAttrCase<

[clang] [CIR] Upstream initial support for switch statements (PR #137106)

2025-04-25 Thread Andy Kaylor via cfe-commits
@@ -753,6 +755,221 @@ def ScopeOp : CIR_Op<"scope", [ ]; } +//===--===// +// SwitchOp +//===--===// + +def CaseOpKind_DT : I32EnumAttrCase<

[clang] [CIR] Upstream initial support for switch statements (PR #137106)

2025-04-25 Thread Andy Kaylor via cfe-commits
@@ -422,6 +428,121 @@ mlir::LogicalResult CIRGenFunction::emitBreakStmt(const clang::BreakStmt &s) { return mlir::success(); } +template +mlir::LogicalResult +CIRGenFunction::emitCaseDefaultCascade(const T *stmt, mlir::Type condType, +

[clang] [CIR] Upstream initial support for switch statements (PR #137106)

2025-04-25 Thread Andy Kaylor via cfe-commits
@@ -753,6 +755,221 @@ def ScopeOp : CIR_Op<"scope", [ ]; } +//===--===// +// SwitchOp +//===--===// + +def CaseOpKind_DT : I32EnumAttrCase<

[clang] [CIR] Upstream initial support for switch statements (PR #137106)

2025-04-25 Thread Andy Kaylor via cfe-commits
@@ -753,6 +755,221 @@ def ScopeOp : CIR_Op<"scope", [ ]; } +//===--===// +// SwitchOp +//===--===// + +def CaseOpKind_DT : I32EnumAttrCase<

[clang] [CIR] Upstream initial support for switch statements (PR #137106)

2025-04-25 Thread Andy Kaylor via cfe-commits
@@ -753,6 +755,221 @@ def ScopeOp : CIR_Op<"scope", [ ]; } +//===--===// +// SwitchOp +//===--===// + +def CaseOpKind_DT : I32EnumAttrCase<

[clang] [CIR] Upstream initial support for switch statements (PR #137106)

2025-04-25 Thread Andy Kaylor via cfe-commits
@@ -753,6 +755,221 @@ def ScopeOp : CIR_Op<"scope", [ ]; } +//===--===// +// SwitchOp +//===--===// + +def CaseOpKind_DT : I32EnumAttrCase<

[clang] [CIR] Upstream initial support for switch statements (PR #137106)

2025-04-25 Thread Andy Kaylor via cfe-commits
@@ -600,3 +721,99 @@ mlir::LogicalResult CIRGenFunction::emitWhileStmt(const WhileStmt &s) { terminateBody(builder, whileOp.getBody(), getLoc(s.getEndLoc())); return mlir::success(); } + +mlir::LogicalResult CIRGenFunction::emitSwitchBody(const Stmt *s) { + // It is rare

[clang] [CIR] Upstream initial support for switch statements (PR #137106)

2025-04-25 Thread Andy Kaylor via cfe-commits
@@ -753,6 +755,221 @@ def ScopeOp : CIR_Op<"scope", [ ]; } +//===--===// +// SwitchOp +//===--===// + +def CaseOpKind_DT : I32EnumAttrCase<

[clang] [clang][Dependency Scanning] Report Exported Modules during Scanning (PR #137421)

2025-04-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Qiongsi Wu (qiongsiwu) Changes We would like to report, for a module, what modules it exports during dependency scanning. This PR implements this reporting by augmenting `ModuleDep`'s `ClangModuleDeps` variable. `ClangModuleDeps` now cont

[clang-tools-extra] [clang-tidy] do not diagnose array types within implicit instantiations of a template (PR #132924)

2025-04-25 Thread St. Muench via cfe-commits
@@ -92,3 +92,162 @@ const char name[] = "Some string"; void takeCharArray(const char name[]); // CHECK-MESSAGES: :[[@LINE-1]]:26: warning: do not declare C-style arrays, use 'std::array' or 'std::vector' instead [modernize-avoid-c-arrays] + +namespace std { + template + str

[clang] [llvm] [RISCV] SiFive CLIC Support (PR #132481)

2025-04-25 Thread Sam Elliott via cfe-commits
@@ -200,6 +203,149 @@ static void emitSCSEpilogue(MachineFunction &MF, MachineBasicBlock &MBB, CFIInstBuilder(MBB, MI, MachineInstr::FrameDestroy).buildRestore(SCSPReg); } +// Insert instruction to swap mscratchsw with sp +static void emitSiFiveCLICStackSwap(MachineFunction

[clang] [llvm] [RISCV] SiFive CLIC Support (PR #132481)

2025-04-25 Thread Craig Topper via cfe-commits
@@ -200,6 +203,149 @@ static void emitSCSEpilogue(MachineFunction &MF, MachineBasicBlock &MBB, CFIInstBuilder(MBB, MI, MachineInstr::FrameDestroy).buildRestore(SCSPReg); } +// Insert instruction to swap mscratchsw with sp +static void emitSiFiveCLICStackSwap(MachineFunction

[clang] [clang] Split out and disable tests that break relative rpaths (PR #137411)

2025-04-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Reid Kleckner (rnk) Changes These two tests copy the clang binary into the test tree and assume it will run from a new location. This is incompatible with relative rpath values, which is what you typically get in a dylib developer build. Di

[clang] [clang] Split out and disable tests that break relative rpaths (PR #137411)

2025-04-25 Thread Reid Kleckner via cfe-commits
https://github.com/rnk created https://github.com/llvm/llvm-project/pull/137411 These two tests copy the clang binary into the test tree and assume it will run from a new location. This is incompatible with relative rpath values, which is what you typically get in a dylib developer build. Disable

[clang] [lld] [llvm] [mlir] [NFC] Use more isa and isa_and_nonnull instead dyn_cast for predicates (PR #137393)

2025-04-25 Thread Jeremy Kun via cfe-commits
https://github.com/j2kun approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/137393 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream initial support for switch statements (PR #137106)

2025-04-25 Thread via cfe-commits
https://github.com/Andres-Salamanca updated https://github.com/llvm/llvm-project/pull/137106 >From f1f56e16d524783c69016867fcdf474ac3e4e09f Mon Sep 17 00:00:00 2001 From: Andres Salamanca Date: Tue, 22 Apr 2025 15:16:19 -0500 Subject: [PATCH 1/7] Add initial CIR support for switch operation --

[clang] [llvm] [RISCV] SiFive CLIC Support (PR #132481)

2025-04-25 Thread Sam Elliott via cfe-commits
lenary wrote: I've resolved the merge conflict so I can merge this, now I'm back at work after some travel. I'll let some pre-commit checks run before I finally hit merge though. https://github.com/llvm/llvm-project/pull/132481 ___ cfe-commits mailin

[clang] [mlir] [OpenACC][NFCI] Implement 'helpers' for all of the clauses I've used so far (PR #137396)

2025-04-25 Thread Andy Kaylor via cfe-commits
@@ -1535,6 +1560,21 @@ def OpenACC_SerialOp : OpenACC_Op<"serial", static mlir::acc::Construct getConstructId() { return mlir::acc::Construct::acc_construct_serial; } +/// Add an entry to the 'async-only' attribute (clause spelled without +/// arguments)fo

[clang] [mlir] [OpenACC][NFCI] Implement 'helpers' for all of the clauses I've used so far (PR #137396)

2025-04-25 Thread Andy Kaylor via cfe-commits
@@ -1785,6 +1850,21 @@ def OpenACC_DataOp : OpenACC_Op<"data", /// Return the wait devnum value clause for the given device_type if /// present. mlir::Value getWaitDevnum(mlir::acc::DeviceType deviceType); +/// Add an entry to the 'async-only' attribute (clause

[clang] [mlir] [OpenACC][NFCI] Implement 'helpers' for all of the clauses I've used so far (PR #137396)

2025-04-25 Thread Andy Kaylor via cfe-commits
@@ -1170,6 +1233,76 @@ void ParallelOp::build(mlir::OpBuilder &odsBuilder, /*defaultAttr=*/nullptr, /*combined=*/nullptr); } +void acc::ParallelOp::addNumWorkersOperand( +MLIRContext *context, mlir::Value newValue, +llvm::ArrayRef effectiveDeviceTypes) { + setNu

[clang] [mlir] [OpenACC][NFCI] Implement 'helpers' for all of the clauses I've used so far (PR #137396)

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

[clang] [mlir] [OpenACC][NFCI] Implement 'helpers' for all of the clauses I've used so far (PR #137396)

2025-04-25 Thread Andy Kaylor via cfe-commits
@@ -1535,6 +1560,21 @@ def OpenACC_SerialOp : OpenACC_Op<"serial", static mlir::acc::Construct getConstructId() { return mlir::acc::Construct::acc_construct_serial; } +/// Add an entry to the 'async-only' attribute (clause spelled without +/// arguments)fo

[clang] [mlir] [OpenACC][NFCI] Implement 'helpers' for all of the clauses I've used so far (PR #137396)

2025-04-25 Thread Andy Kaylor via cfe-commits
@@ -76,6 +76,69 @@ struct LLVMPointerPointerLikeModel LLVM::LLVMPointerType> { Type getElementType(Type pointer) const { return Type(); } }; + +/// Helper function for any of the times we need to modify an ArrayAttr based on +/// a

[clang] [mlir] [OpenACC][NFCI] Implement 'helpers' for all of the clauses I've used so far (PR #137396)

2025-04-25 Thread Andy Kaylor via cfe-commits
@@ -1785,6 +1850,21 @@ def OpenACC_DataOp : OpenACC_Op<"data", /// Return the wait devnum value clause for the given device_type if /// present. mlir::Value getWaitDevnum(mlir::acc::DeviceType deviceType); +/// Add an entry to the 'async-only' attribute (clause

[clang] [mlir] [OpenACC][NFCI] Implement 'helpers' for all of the clauses I've used so far (PR #137396)

2025-04-25 Thread Andy Kaylor via cfe-commits
@@ -1679,6 +1719,31 @@ def OpenACC_KernelsOp : OpenACC_Op<"kernels", static mlir::acc::Construct getConstructId() { return mlir::acc::Construct::acc_construct_kernels; } +/// Add a value to 'num_workers' with the current list of device types. +void addNumW

[clang] [mlir] [OpenACC][NFCI] Implement 'helpers' for all of the clauses I've used so far (PR #137396)

2025-04-25 Thread Andy Kaylor via cfe-commits
@@ -76,6 +76,69 @@ struct LLVMPointerPointerLikeModel LLVM::LLVMPointerType> { Type getElementType(Type pointer) const { return Type(); } }; + +/// Helper function for any of the times we need to modify an ArrayAttr based on +/// a

[clang] [mlir] [OpenACC][NFCI] Implement 'helpers' for all of the clauses I've used so far (PR #137396)

2025-04-25 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. This looks good. I just have a nit repeated many times, and a question about code duplication. https://github.com/llvm/llvm-project/pull/137396 ___ cfe-commits mailing list cfe-commits@lists.ll

[clang] [mlir] [OpenACC][NFCI] Implement 'helpers' for all of the clauses I've used so far (PR #137396)

2025-04-25 Thread Andy Kaylor via cfe-commits
@@ -1679,6 +1719,31 @@ def OpenACC_KernelsOp : OpenACC_Op<"kernels", static mlir::acc::Construct getConstructId() { return mlir::acc::Construct::acc_construct_kernels; } +/// Add a value to 'num_workers' with the current list of device types. +void addNumW

[clang] [mlir] [OpenACC][NFCI] Implement 'helpers' for all of the clauses I've used so far (PR #137396)

2025-04-25 Thread Razvan Lupusoru via cfe-commits
https://github.com/razvanlupusoru approved this pull request. Thank you so much for doing this! https://github.com/llvm/llvm-project/pull/137396 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] [llvm] [DXIL] Remove incompatible metadata types when preparing DXIL. (PR #136386)

2025-04-25 Thread Joshua Batista via cfe-commits
bob80905 wrote: Created a new issue to improve range metadata validation here: https://github.com/llvm/llvm-project/issues/137407 https://github.com/llvm/llvm-project/pull/136386 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[clang] [llvm] [DXIL] Remove incompatible metadata types when preparing DXIL. (PR #136386)

2025-04-25 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/136386 >From c1a89d6896edd29ff345dd8fdc30cd040f3760f3 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Fri, 18 Apr 2025 16:06:18 -0700 Subject: [PATCH 1/6] add md node type filter, and test --- .../test/CodeGenHL

[clang] [mlir] [OpenACC][NFCI] Implement 'helpers' for all of the clauses I've used so far (PR #137396)

2025-04-25 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. https://github.com/llvm/llvm-project/pull/137396 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Treat classes and structs as packed by default (PR #137391)

2025-04-25 Thread Justin Bogner via cfe-commits
bogner wrote: > Are there offload test suite tests to go with this? https://github.com/llvm-beanz/offload-test-suite/pull/83 https://github.com/llvm/llvm-project/pull/137391 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang] [CIR] Upstream initial support for fixed size VectorType (PR #136488)

2025-04-25 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. This looks good to me if @xlauko is satisfied with the new changes. https://github.com/llvm/llvm-project/pull/136488 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang] [CIR] Fix calling defined functions (PR #137271)

2025-04-25 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor closed https://github.com/llvm/llvm-project/pull/137271 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream TernaryOp (PR #137184)

2025-04-25 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. I've still got a couple of open nits about the comments in CIRDialect.cpp, but otherwise this looks good. https://github.com/llvm/llvm-project/pull/137184 ___ cfe-commits mailing list cfe-commi

[clang] 8b98612 - [CIR] Fix calling defined functions (#137271)

2025-04-25 Thread via cfe-commits
Author: Andy Kaylor Date: 2025-04-25T12:08:52-07:00 New Revision: 8b9861291000b6f593185752620008f7b6fd6149 URL: https://github.com/llvm/llvm-project/commit/8b9861291000b6f593185752620008f7b6fd6149 DIFF: https://github.com/llvm/llvm-project/commit/8b9861291000b6f593185752620008f7b6fd6149.diff L

[clang] [mlir] [OpenACC] Implement 'helpers' for all of the clauses I've used so far (PR #137396)

2025-04-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Erich Keane (erichkeane) Changes As a follow up to 3c4dff3ac6884b85fe93fe512c5bdaf014738c45 I audited all uses of 'process clause and use additive methods', and added explicit functions to the construct to make it easier for the next pr

[clang] [CIR] Upstream TernaryOp (PR #137184)

2025-04-25 Thread Andy Kaylor via cfe-commits
@@ -609,8 +609,8 @@ def ConditionOp : CIR_Op<"condition", [ //===--===// def YieldOp : CIR_Op<"yield", [ReturnLike, Terminator, - ParentOneOf<["IfOp", "ScopeOp", "WhileOp", -

  1   2   3   4   >