[clang] [clang][Sema] Fix type of an statement expression ending with an atomic type (PR #119711)

2025-02-12 Thread Alejandro Álvarez Ayllón via cfe-commits
https://github.com/alejandro-alvarez-sonarsource updated https://github.com/llvm/llvm-project/pull/119711 From d398fa13c2fa141954c79ca68a59c6ac506b393f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alejandro=20=C3=81lvarez=20Ayll=C3=B3n?= Date: Wed, 11 Dec 2024 15:43:58 +0100 Subject: [PATCH 1/6] A

[clang] Add support for dynamic libraries in CLANG_BOLT (PR #127020)

2025-02-12 Thread via cfe-commits
serge-sans-paille wrote: cc @tbaederr , @nikic and @sylvestre , this could be useful when packaging clang optimized with bolt on Fedora or Debian https://github.com/llvm/llvm-project/pull/127020 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] Add support for dynamic libraries in CLANG_BOLT (PR #127020)

2025-02-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (serge-sans-paille) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/127020.diff 2 Files Affected: - (modified) clang/tools/driver/CMakeLists.txt (+36-10) - (modified) clang/utils/perf-training/perf-helper.py (+92

[clang] Add support for dynamic libraries in CLANG_BOLT (PR #127020)

2025-02-12 Thread via cfe-commits
https://github.com/serge-sans-paille created https://github.com/llvm/llvm-project/pull/127020 None >From c2d1352aba4872957e34633b92d87c39d0eb7e45 Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Tue, 11 Feb 2025 18:20:15 +0100 Subject: [PATCH 1/2] [clang][cmake] Sanitize CLANG_BOLT value

[clang] [clang][AST] Handle dependent representation of call to function with explicit object parameter in CallExpr::getBeginLoc() (PR #126868)

2025-02-12 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > Can we please add more details in the summary about e.g. "This fixes a crash > when ... and the fix is ..." Done. https://github.com/llvm/llvm-project/pull/126868 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:/

[clang] [clang][AST] Handle dependent representation of call to function with explicit object parameter in CallExpr::getBeginLoc() (PR #126868)

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

[clang] [clang][AST] Handle dependent representation of call to function with explicit object parameter in CallExpr::getBeginLoc() (PR #126868)

2025-02-12 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > While this may not be the most optimal solution, we can likely go with it > as-is to put the fire out. Given [this comment](https://github.com/llvm/llvm-project/pull/126868#discussion_r1953948099) (i.e. that the behaviour with this patch is correct for the dependent ca

[libclc] [libclc] Stop installing CLC headers (PR #126908)

2025-02-12 Thread Karol Herbst via cfe-commits
karolherbst wrote: > > Maybe there is a better tripple to be used in this case? However we do want > > to compile to SPIR-V (with the native target in the future anyway), it's > > just it enables a bunch of things automatically. > > I'm not sure I understand what the issue is. The defines here

[clang] [clang][AST] Handle dependent representation of call to function with explicit object parameter in CallExpr::getBeginLoc() (PR #126868)

2025-02-12 Thread Nathan Ridge via cfe-commits
@@ -1645,11 +1645,21 @@ SourceLocation CallExpr::getBeginLoc() const { if (const auto *OCE = dyn_cast(this)) return OCE->getBeginLoc(); + // A non-dependent call to a member function with an explicit object parameter + // is modelled with the object expression being t

[clang] [clang][AST] Handle dependent representation of call to function with explicit object parameter in CallExpr::getBeginLoc() (PR #126868)

2025-02-12 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/126868 >From dc03bb6854545dabb9023d6c66e7593d692f8a82 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Wed, 12 Feb 2025 02:37:49 -0500 Subject: [PATCH] [clang][AST] Handle dependent representation of call to f

[clang] [FixIt] Improve Source Ranges and Fix-It Hints for Unused Lambda Captures #106445 (PR #117953)

2025-02-12 Thread via cfe-commits
https://github.com/charan-003 updated https://github.com/llvm/llvm-project/pull/117953 >From b886394f3aca3ea53f2c97d85a8e963d192c122f Mon Sep 17 00:00:00 2001 From: charan-003 <85248228+charan-...@users.noreply.github.com> Date: Wed, 27 Nov 2024 18:43:38 -0700 Subject: [PATCH 01/23] Update SemaL

[clang] [NFC] Avoid potential null deref by adding an assert. (PR #127017)

2025-02-12 Thread via cfe-commits
https://github.com/schittir created https://github.com/llvm/llvm-project/pull/127017 None >From 66a9f9938ead51155560c911537c00bad7c644df Mon Sep 17 00:00:00 2001 From: Sindhu Chittireddy Date: Wed, 12 Feb 2025 23:27:01 -0800 Subject: [PATCH] [NFC] Avoid potential null deref by adding an assert

[clang] [clang][AST] Handle dependent representation of call to function with explicit object parameter in CallExpr::getBeginLoc() (PR #126868)

2025-02-12 Thread Nathan Ridge via cfe-commits
@@ -1648,8 +1648,11 @@ SourceLocation CallExpr::getBeginLoc() const { if (const auto *Method = dyn_cast_if_present(getCalleeDecl()); Method && Method->isExplicitObjectMemberFunction()) { -assert(getNumArgs() > 0 && getArg(0)); -return getArg(0)->getBeg

[clang] [clang][analysis] Fix flaky clang/test/Analysis/live-stmts.cpp test (PR #126913)

2025-02-12 Thread Mikael Holmén via cfe-commits
mikaelholmen wrote: > > Unfortunately the test still seems to be flaky. With EXPENSIVE_CHECKS I > > often see it fail on the RHEL8 x86_64 machines I use. > > E.g. > > ``` > > FAIL: Clang :: Analysis/live-stmts.cpp (1 of 1) > > TEST 'Clang :: Analysis/live-stmts.cpp' FAILED

[clang] [clang][AST] Handle dependent representation of call to function with explicit object parameter in CallExpr::getBeginLoc() (PR #126868)

2025-02-12 Thread Younan Zhang via cfe-commits
@@ -1645,11 +1645,21 @@ SourceLocation CallExpr::getBeginLoc() const { if (const auto *OCE = dyn_cast(this)) return OCE->getBeginLoc(); + // A non-dependent call to a member function with an explicit object parameter + // is modelled with the object expression being t

[clang] [clang][AST] Handle dependent representation of call to function with explicit object parameter in CallExpr::getBeginLoc() (PR #126868)

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

[clang] [clang][AST] Handle dependent representation of call to function with explicit object parameter in CallExpr::getBeginLoc() (PR #126868)

2025-02-12 Thread Nathan Ridge via cfe-commits
@@ -1648,8 +1648,11 @@ SourceLocation CallExpr::getBeginLoc() const { if (const auto *Method = dyn_cast_if_present(getCalleeDecl()); Method && Method->isExplicitObjectMemberFunction()) { -assert(getNumArgs() > 0 && getArg(0)); -return getArg(0)->getBeg

[clang] [clang][AST] Handle dependent representation of call to function with explicit object parameter in CallExpr::getBeginLoc() (PR #126868)

2025-02-12 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 updated https://github.com/llvm/llvm-project/pull/126868 >From 94300606f574b39a13d580aaf38b214293dfd502 Mon Sep 17 00:00:00 2001 From: Nathan Ridge Date: Wed, 12 Feb 2025 02:37:49 -0500 Subject: [PATCH] [clang][AST] Handle dependent representation of call to f

[clang] [libclang] Always Dup in createRef(StringRef) (PR #125020)

2025-02-12 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-aarch64-linux-bootstrap-asan` running on `sanitizer-buildbot7` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/24/builds/5252 Here is the releva

[clang] [clang][analysis] Fix flaky clang/test/Analysis/live-stmts.cpp test (PR #126913)

2025-02-12 Thread Balazs Benics via cfe-commits
steakhal wrote: > Unfortunately the test still seems to be flaky. With EXPENSIVE_CHECKS I often > see it fail on the RHEL8 x86_64 machines I use. > E.g. > ``` > FAIL: Clang :: Analysis/live-stmts.cpp (1 of 1) > TEST 'Clang :: Analysis/live-stmts.cpp' FAILED > **

[clang] [clang][Sema] Add diagnostic note for reference of function-like macros requiring without parentheses (PR #123495)

2025-02-12 Thread via cfe-commits
StarOne01 wrote: > If you're talking about > https://github.com/llvm/llvm-project/blob/cb3498c6704daefc6e5221beb757126765737aa7/clang/lib/Sema/SemaExpr.cpp#L2527, > I would expect that condition to be true for both code examples because > there is a scope (the body of `main`) and there is a `T

[clang] [clang][analysis] Fix flaky clang/test/Analysis/live-stmts.cpp test (PR #126913)

2025-02-12 Thread Mikael Holmén via cfe-commits
mikaelholmen wrote: Unfortunately the test still seems to be flaky. With EXPENSIVE_CHECKS I often see it fail on the RHEL8 x86_64 machines I use. E.g. ``` FAIL: Clang :: Analysis/live-stmts.cpp (1 of 1) TEST 'Clang :: Analysis/live-stmts.cpp' FAILED Exi

[libclc] [libclc] Stop installing CLC headers (PR #126908)

2025-02-12 Thread Matt Arsenault via cfe-commits
arsenm wrote: > > Maybe there is a better tripple to be used in this case? However we do want > to compile to SPIR-V (with the native target in the future anyway), it's just > it enables a bunch of things automatically. I'm not sure I understand what the issue is. The defines here just declar

[clang] [ubsan] Remove -fsanitizer=vptr from -fsanitizer=undefined (PR #121115)

2025-02-12 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/121115 >From bca319184733b4bad1eb6b83aaac18a75be40b8c Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Wed, 25 Dec 2024 14:22:10 -0800 Subject: [PATCH 1/3] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20ch?= =?

[clang] [clang] [ASTDump] Add support for structural value template arguments in TextNodeDumper (PR #126341)

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

[clang] 7050e7d - [clang] [ASTDump] Add support for structural value template arguments in TextNodeDumper (#126341)

2025-02-12 Thread via cfe-commits
Author: sakria9 Date: 2025-02-13T14:06:45+08:00 New Revision: 7050e7d2a305dd2b91774e89fb028794cca63c37 URL: https://github.com/llvm/llvm-project/commit/7050e7d2a305dd2b91774e89fb028794cca63c37 DIFF: https://github.com/llvm/llvm-project/commit/7050e7d2a305dd2b91774e89fb028794cca63c37.diff LOG:

[clang] [clang] [ASTDump] Add support for structural value template arguments in TextNodeDumper (PR #126341)

2025-02-12 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 closed https://github.com/llvm/llvm-project/pull/126341 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang] Replace createRef with createDup (PR #126683)

2025-02-12 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/126683 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] e76739e - [libclang] Always Dup in createRef(StringRef) (#125020)

2025-02-12 Thread via cfe-commits
Author: Vitaly Buka Date: 2025-02-12T22:05:19-08:00 New Revision: e76739eeb952940b2979c70ba44a28fecf592695 URL: https://github.com/llvm/llvm-project/commit/e76739eeb952940b2979c70ba44a28fecf592695 DIFF: https://github.com/llvm/llvm-project/commit/e76739eeb952940b2979c70ba44a28fecf592695.diff L

[clang] [libclang] Always Dup in createRef(StringRef) (PR #125020)

2025-02-12 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka closed https://github.com/llvm/llvm-project/pull/125020 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang] Always Dup in createRef(StringRef) (PR #125020)

2025-02-12 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/125020 >From 10af91096eda7eb2b7f07cf239f53ac3af456566 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Wed, 29 Jan 2025 19:59:21 -0800 Subject: [PATCH 1/3] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?

[clang] [libclang] Always Dup in createRef(StringRef) (PR #125020)

2025-02-12 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/125020 >From 10af91096eda7eb2b7f07cf239f53ac3af456566 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Wed, 29 Jan 2025 19:59:21 -0800 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?

[clang] [clang] [ASTDump] Add support for structural value template arguments in TextNodeDumper (PR #126341)

2025-02-12 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 approved this pull request. Thanks https://github.com/llvm/llvm-project/pull/126341 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libclang] Always Dup in createRef(StringRef) (PR #125020)

2025-02-12 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > Please add a release note so that users know about the fix and about the > expected performance costs, but otherwise LGTM done https://github.com/llvm/llvm-project/pull/125020 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[clang] [libclang] Always Dup in createRef(StringRef) (PR #125020)

2025-02-12 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka updated https://github.com/llvm/llvm-project/pull/125020 >From 10af91096eda7eb2b7f07cf239f53ac3af456566 Mon Sep 17 00:00:00 2001 From: Vitaly Buka Date: Wed, 29 Jan 2025 19:59:21 -0800 Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?= =?

[clang] [clang][CodeGen] `sret` args should always point to the `alloca` AS, so use that (PR #114062)

2025-02-12 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm approved this pull request. We can't keep waiting for this to get in the release https://github.com/llvm/llvm-project/pull/114062 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[clang] [clang][CodeGen] `sret` args should always point to the `alloca` AS, so use that (PR #114062)

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

[clang-tools-extra] [clang-tidy] Add recursion protection in ExceptionSpecAnalyzer (PR #66810)

2025-02-12 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL updated https://github.com/llvm/llvm-project/pull/66810 >From 4c4234a2c4c3e7a164befe5c89361f89ebd9728d Mon Sep 17 00:00:00 2001 From: Piotr Zegar Date: Tue, 19 Sep 2023 19:05:00 + Subject: [PATCH] [clang-tidy] Add recursion protection in ExceptionSpecAnalyzer N

[clang] [llvm] [AMDGPU] Add builtins for wave reduction intrinsics (PR #127013)

2025-02-12 Thread via cfe-commits
https://github.com/easyonaadit edited https://github.com/llvm/llvm-project/pull/127013 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Add builtins for wave reduction intrinsics (PR #127013)

2025-02-12 Thread via cfe-commits
easyonaadit wrote: Stacked on: https://github.com/llvm/llvm-project/pull/126469 https://github.com/llvm/llvm-project/pull/127013 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AMDGPU] Add builtins for wave reduction intrinsics (PR #127013)

2025-02-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Aaditya (easyonaadit) Changes Currently there are no plans to push these into a public header. Initial use is for testing purposes. --- Patch is 523.30 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project

[clang] [llvm] [AMDGPU] Add builtins for wave reduction intrinsics (PR #127013)

2025-02-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-ir Author: Aaditya (easyonaadit) Changes Currently there are no plans to push these into a public header. Initial use is for testing purposes. --- Patch is 523.30 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-proje

[clang] [CUDA] Increment VTable index for device thunks (PR #124989)

2025-02-12 Thread Anshil Gandhi via cfe-commits
gandhi56 wrote: Internal tests have passed. https://github.com/llvm/llvm-project/pull/124989 ___ 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-12 Thread Kareem Ergawy via cfe-commits
@@ -0,0 +1,380 @@ + + +# `DO CONCURENT` mapping to OpenMP + +```{contents} +--- +local: +--- +``` + +This document seeks to describe the effort to parallelize `do concurrent` loops +by mapping them to OpenMP worksharing constructs. The goals of this document +are: +* Describing ho

[clang] [llvm] [CaptureTracking][FunctionAttrs] Add support for CaptureInfo (PR #125880)

2025-02-12 Thread Yingwei Zheng via cfe-commits
https://github.com/dtcxzyw approved this pull request. LG https://github.com/llvm/llvm-project/pull/125880 ___ 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-12 Thread Kareem Ergawy via cfe-commits
ergawy wrote: @skatrak @kiranchandramohan I removed the "current status" part of the document. Left the other sections since they are not related to upcoming upstreaming PRs. https://github.com/llvm/llvm-project/pull/126026 ___ cfe-commits mailing li

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

2025-02-12 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy updated https://github.com/llvm/llvm-project/pull/126026 >From 207fc495f95a852f2689b0fb1d369ac1cc0dea17 Mon Sep 17 00:00:00 2001 From: ergawy Date: Wed, 5 Feb 2025 23:31:15 -0600 Subject: [PATCH 1/7] [flang][OpenMP] Upstream first part of `do concurrent` mapping This

[clang] [llvm] [LLVM][Triple][NFCI] Add function to test for GPU offloading triples (PR #126956)

2025-02-12 Thread Matt Arsenault via cfe-commits
@@ -2624,9 +2624,8 @@ void CGOpenMPRuntime::emitDistributeStaticInit( emitUpdateLocation(CGF, Loc, OMP_IDENT_WORK_DISTRIBUTE); llvm::Value *ThreadId = getThreadID(CGF, Loc); llvm::FunctionCallee StaticInitFunction; - bool isGPUDistribute = - CGM.getLangOpts().Op

[clang] [llvm] [LLVM][Triple][NFCI] Add function to test for GPU offloading triples (PR #126956)

2025-02-12 Thread Joseph Huber via cfe-commits
@@ -2624,9 +2624,8 @@ void CGOpenMPRuntime::emitDistributeStaticInit( emitUpdateLocation(CGF, Loc, OMP_IDENT_WORK_DISTRIBUTE); llvm::Value *ThreadId = getThreadID(CGF, Loc); llvm::FunctionCallee StaticInitFunction; - bool isGPUDistribute = - CGM.getLangOpts().Op

[clang] [llvm] [LLVM][Triple][NFCI] Add function to test for GPU offloading triples (PR #126956)

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

[clang] [llvm] [LLVM][Triple][NFCI] Add function to test for GPU offloading triples (PR #126956)

2025-02-12 Thread Matt Arsenault via cfe-commits
@@ -2624,9 +2624,8 @@ void CGOpenMPRuntime::emitDistributeStaticInit( emitUpdateLocation(CGF, Loc, OMP_IDENT_WORK_DISTRIBUTE); llvm::Value *ThreadId = getThreadID(CGF, Loc); llvm::FunctionCallee StaticInitFunction; - bool isGPUDistribute = - CGM.getLangOpts().Op

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

2025-02-12 Thread Kareem Ergawy via cfe-commits
@@ -0,0 +1,380 @@ + + +# `DO CONCURENT` mapping to OpenMP + +```{contents} +--- +local: +--- +``` + +This document seeks to describe the effort to parallelize `do concurrent` loops +by mapping them to OpenMP worksharing constructs. The goals of this document +are: +* Describing ho

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

2025-02-12 Thread Kareem Ergawy via cfe-commits
https://github.com/ergawy updated https://github.com/llvm/llvm-project/pull/126026 >From 207fc495f95a852f2689b0fb1d369ac1cc0dea17 Mon Sep 17 00:00:00 2001 From: ergawy Date: Wed, 5 Feb 2025 23:31:15 -0600 Subject: [PATCH 1/6] [flang][OpenMP] Upstream first part of `do concurrent` mapping This

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

2025-02-12 Thread Kareem Ergawy via cfe-commits
@@ -0,0 +1,380 @@ + + +# `DO CONCURENT` mapping to OpenMP + +```{contents} +--- +local: +--- +``` + +This document seeks to describe the effort to parallelize `do concurrent` loops +by mapping them to OpenMP worksharing constructs. The goals of this document +are: +* Describing ho

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

2025-02-12 Thread Kareem Ergawy via cfe-commits
@@ -6919,6 +6919,10 @@ defm loop_versioning : BoolOptionWithoutMarshalling<"f", "version-loops-for-stri def fhermetic_module_files : Flag<["-"], "fhermetic-module-files">, Group, HelpText<"Emit hermetic module files (no nested USE association)">; + +def do_concurrent_to_op

[clang] [llvm] [RISCV] Add a generic OOO CPU (PR #120712)

2025-02-12 Thread Pengcheng Wang via cfe-commits
wangpc-pp wrote: Ping. Any more comments? https://github.com/llvm/llvm-project/pull/120712 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Support BraceWrapping.AfterNamespace with AllowShortNamespacesOnASingleLine (PR #123010)

2025-02-12 Thread Owen Pan via cfe-commits
@@ -632,24 +631,37 @@ class LineJoiner { if (Limit == 0) return 0; -assert(I[1]); -const auto &L1 = *I[1]; +// The merging code is relative to the opening namespace brace, which could +// be either on the first or second line due to the brace wrapping

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

2025-02-12 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 e3c16e003c041f2b354981f1b0d818907525e0e8 fbaf536b943b3630f39cff2e2e6d78b176ee374c --e

[clang] [NFC] Avoid potential null dereference. (PR #126872)

2025-02-12 Thread Owen Pan via cfe-commits
owenca wrote: @hstk30-hw please add a test case that would cause a crash without your patch. https://github.com/llvm/llvm-project/pull/126872 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co

[clang] [clang-format] Support BraceWrapping.AfterNamespace with AllowShortNamespacesOnASingleLine (PR #123010)

2025-02-12 Thread Owen Pan via cfe-commits
@@ -688,8 +701,8 @@ class LineJoiner { if (L2.First->isNot(tok::r_brace) || L2.First->MustBreakBefore) owenca wrote: ```suggestion if (L2.First->isNot(TT_NamespaceRBrace) || L2.First->MustBreakBefore) ``` https://github.com/llvm/llvm-project/pull/123010

[clang] [clang-format] Support BraceWrapping.AfterNamespace with AllowShortNamespacesOnASingleLine (PR #123010)

2025-02-12 Thread Owen Pan via cfe-commits
@@ -660,17 +672,18 @@ class LineJoiner { assert(Limit >= L1.Last->TotalLength + 3); const auto InnerLimit = Limit - L1.Last->TotalLength - 3; - const auto MergedLines = tryMergeNamespace(I + 1, E, InnerLimit); + const auto MergedLines = + tryMerg

[clang] [clang-format] Support BraceWrapping.AfterNamespace with AllowShortNamespacesOnASingleLine (PR #123010)

2025-02-12 Thread Owen Pan via cfe-commits
https://github.com/owenca approved this pull request. https://github.com/llvm/llvm-project/pull/123010 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Support BraceWrapping.AfterNamespace with AllowShortNamespacesOnASingleLine (PR #123010)

2025-02-12 Thread Owen Pan via cfe-commits
@@ -28430,6 +28430,36 @@ TEST_F(FormatTest, ShortNamespacesOption) { "}}} // namespace foo::bar::baz", "namespace foo { namespace bar { namespace baz { class qux; } } }", Style); + Style.FixNamespaceComments = false; + + Style.BreakBeforeBraces = FormatStyle

[clang] [clang-format] Support BraceWrapping.AfterNamespace with AllowShortNamespacesOnASingleLine (PR #123010)

2025-02-12 Thread Owen Pan via cfe-commits
@@ -632,24 +631,37 @@ class LineJoiner { if (Limit == 0) return 0; -assert(I[1]); -const auto &L1 = *I[1]; +// The merging code is relative to the opening namespace brace, which could +// be either on the first or second line due to the brace wrapping

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

2025-02-12 Thread via cfe-commits
@@ -0,0 +1,50 @@ +# REQUIRES: x86 + +## Test that generated JSON file for DTLTO is valid and contains the expected +## options based on the LTO configuration. + +# RUN: rm -rf %t.dir && split-file %s %t.dir && cd %t.dir + +## Compile bitcode. +# RUN: opt -thinlto-bc foo.ll -o foo.

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

2025-02-12 Thread via cfe-commits
@@ -969,6 +969,10 @@ def Xlinker : Separate<["-"], "Xlinker">, Flags<[LinkerInput, RenderAsInput]>, Visibility<[ClangOption, CLOption, FlangOption]>, HelpText<"Pass to the linker">, MetaVarName<"">, Group; +def Xdist : Separate<["-"], "Xdist">, Flags<[LinkOption]>,

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

2025-02-12 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/12] wip --- clang/lib/CodeGen/CGExpr.cpp | 19

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

2025-02-12 Thread via cfe-commits
@@ -0,0 +1,60 @@ +Distributed ThinLTO (DTLTO) +=== + +DTLTO allows for the distribution of backend ThinLTO compilations via external +distribution systems, e.g. Incredibuild. There is existing support for +distributing ThinLTO compilations by using separate

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

2025-02-12 Thread via cfe-commits
bd1976bris wrote: > > Great. Actually, we wanted to add support for distributing via FASTBuild, > > icecream and distcc with the initial DTLTO PR. However, we investigated > > found that these couldn't be supported without extending the existing > > codebases. More details to follow.. > > Int

[clang] 30a9941 - [SPARC][IAS] Add IAS flag handling for ISA levels

2025-02-12 Thread via cfe-commits
Author: Koakuma Date: 2025-02-13T10:22:31+07:00 New Revision: 30a9941624350523535bdec201c895698c171afd URL: https://github.com/llvm/llvm-project/commit/30a9941624350523535bdec201c895698c171afd DIFF: https://github.com/llvm/llvm-project/commit/30a9941624350523535bdec201c895698c171afd.diff LOG:

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

2025-02-12 Thread via cfe-commits
@@ -1702,6 +1703,38 @@ static uint8_t getOsAbi(const Triple &t) { } } +namespace dtlto { +// Check if an archive file is a thin archive. +bool isThinArchive(Ctx &ctx, StringRef archiveFilePath) { + const size_t thinArchiveMagicLen = sizeof(ThinArchiveMagic) - 1; + + ErrorO

[clang] [clang][dataflow] Remove a deprecated CachedConstAccessorsLattice API (PR #127001)

2025-02-12 Thread Jan Voung via cfe-commits
https://github.com/jvoung edited https://github.com/llvm/llvm-project/pull/127001 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement HLSL intialization list support (PR #123141)

2025-02-12 Thread Chris B via cfe-commits
llvm-beanz wrote: > > How does it not duplicate sub-expressions while also not creating temporary > > variables to capture results? > > The way I thought of to comprehensively solve this in a clear general way was > to: > > * create a new temporary with an anonymous struct type containing the

[clang] [clang][dataflow] Remove a deprecated CachedConstAccessorsLattice API (PR #127001)

2025-02-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-analysis Author: Jan Voung (jvoung) Changes We've already migrated known users from the old to the new version of getOrCreateConstMethodReturnStorageLocation. The conversion is pretty straightforward as well, if there are

[clang] [clang][dataflow] Remove a deprecated CachedConstAccessorsLattice API (PR #127001)

2025-02-12 Thread Jan Voung via cfe-commits
https://github.com/jvoung created https://github.com/llvm/llvm-project/pull/127001 We've already migrated known users from the old to the new version of getOrCreateConstMethodReturnStorageLocation. The conversion is pretty straightforward as well, if there are out-of-tree users: Previously: use

[clang] [C++20] [Modules] Instantiate pending instantiations when GMF ends (PR #126842)

2025-02-12 Thread Chuanqi Xu via cfe-commits
@@ -1104,9 +1104,13 @@ void Sema::ActOnStartOfTranslationUnit() { } void Sema::ActOnEndOfTranslationUnitFragment(TUFragmentKind Kind) { - // No explicit actions are required at the end of the global module fragment. - if (Kind == TUFragmentKind::Global) + if (Kind == TUFrag

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

2025-02-12 Thread via cfe-commits
@@ -1702,6 +1703,38 @@ static uint8_t getOsAbi(const Triple &t) { } } +namespace dtlto { +// Check if an archive file is a thin archive. +bool isThinArchive(Ctx &ctx, StringRef archiveFilePath) { bd1976bris wrote: These are static functions now. https://gi

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

2025-02-12 Thread via cfe-commits
@@ -243,6 +243,8 @@ struct Config { llvm::SmallVector searchPaths; llvm::SmallVector symbolOrderingFile; llvm::SmallVector thinLTOModulesToCompile; + llvm::StringRef DTLTODistributor; bd1976bris wrote: Oops. Thanks. https://github.com/llvm/llvm-project

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

2025-02-12 Thread via cfe-commits
@@ -535,6 +535,25 @@ void tools::gnutools::Linker::ConstructJob(Compilation &C, const JobAction &JA, D.getLTOMode() == LTOK_Thin); } + // Forward the DTLTO options to the linker. We add these unconditionally, + // rather than in addLTOOptions() as it is

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

2025-02-12 Thread via cfe-commits
@@ -4082,7 +4086,9 @@ def ffinite_loops: Flag<["-"], "ffinite-loops">, Group, def fno_finite_loops: Flag<["-"], "fno-finite-loops">, Group, HelpText<"Do not assume that any loop is finite.">, Visibility<[ClangOption, CC1Option]>; - +def fthinlto_distributor_EQ : Joined<["

[clang] [clang][analyzer] fix false positive of BlockInCriticalSectionChecker (PR #126752)

2025-02-12 Thread via cfe-commits
flovent wrote: I thought about the case when file descriptor equals to -1, which is modeled by `evalcall` for `open` in testcase, means that `open` failed to get a valid file descriptor, if we use this file descriptor in `read` or `recv`, they will not be blocked since no actual read is perfor

[clang] [clang-format] Support BraceWrapping.AfterNamespace with AllowShortNamespacesOnASingleLine (PR #123010)

2025-02-12 Thread Owen Pan via cfe-commits
@@ -628,28 +632,36 @@ class LineJoiner { unsigned tryMergeNamespace(ArrayRef::const_iterator I, ArrayRef::const_iterator E, - unsigned Limit) { + unsigned Limit, bool OpenBraceWrapped) {

[libunwind] [libunwind][NFC] Remove the CET keyword in shadow stack-related stuffs (PR #126663)

2025-02-12 Thread via cfe-commits
jinge90 wrote: > Normally we should not remove symbols for backward compatibility, but in this > niche case I am not sure anyone uses these CET function names, so I think the > rename is fine. Instead of `ss`, perhaps `shstk`? I agree that it's useful to > unify the naming on aarch64/riscv/x86

[libunwind] [libunwind][NFC] Remove the CET keyword in shadow stack-related stuffs (PR #126663)

2025-02-12 Thread Ming-Yi Lai via cfe-commits
mylai-mtk wrote: Great! --- Update: Use "shstk" instead of "ss" as the new name https://github.com/llvm/llvm-project/pull/126663 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind][NFC] Remove the CET keyword in shadow stack-related stuffs (PR #126663)

2025-02-12 Thread Ming-Yi Lai via cfe-commits
https://github.com/mylai-mtk updated https://github.com/llvm/llvm-project/pull/126663 >From 39731df5b3e48fe2623786b120dc0eae604f8de6 Mon Sep 17 00:00:00 2001 From: Ming-Yi Lai Date: Tue, 11 Feb 2025 11:20:42 +0800 Subject: [PATCH 1/3] [libunwind][NFC] Remove the CET keyword in shadow stack-rel

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

2025-02-12 Thread via cfe-commits
@@ -1702,6 +1703,38 @@ static uint8_t getOsAbi(const Triple &t) { } } +namespace dtlto { +// Check if an archive file is a thin archive. +bool isThinArchive(Ctx &ctx, StringRef archiveFilePath) { bd1976bris wrote: Thanks. However, I think that these should

[clang] [HLSL] Implement HLSL intialization list support (PR #123141)

2025-02-12 Thread Tex Riddell via cfe-commits
tex3d wrote: > How does it not duplicate sub-expressions while also not creating temporary > variables to capture results? The way I thought of to comprehensively solve this in a clear general way was to: - create a new temporary with an anonymous struct type containing the exact sequence of

[clang] [WebKit Checkers] Treat offsetof as a trivial expression. (PR #126996)

2025-02-12 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/126996 >From f7eafbfd258fb0acf60a01d033958f859c426ff3 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Wed, 12 Feb 2025 17:52:45 -0800 Subject: [PATCH 1/3] [WebKit Checkers] Treat offsetof as a trivial expression. ---

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

2025-02-12 Thread via cfe-commits
@@ -186,6 +187,16 @@ BitcodeCompiler::BitcodeCompiler(Ctx &ctx) : ctx(ctx) { std::string(ctx.arg.thinLTOPrefixReplaceNew), std::string(ctx.arg.thinLTOPrefixReplaceNativeObject), ctx.arg.thinLTOEmitImportsFiles, indexFile.get(), onIndexWrite); + } else i

[clang] [WebKit Checkers] Treat offsetof as a trivial expression. (PR #126996)

2025-02-12 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/126996 >From f7eafbfd258fb0acf60a01d033958f859c426ff3 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Wed, 12 Feb 2025 17:52:45 -0800 Subject: [PATCH 1/2] [WebKit Checkers] Treat offsetof as a trivial expression. ---

[clang] [WebKit Checkers] Treat offsetof as a trivial expression. (PR #126996)

2025-02-12 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 8ed36373a2227c7d39fb1a520ec8dde476dc5603 f7eafbfd258fb0acf60a01d033958f859c426ff3 --e

[clang] [WebKit Checkers] Treat offsetof as a trivial expression. (PR #126996)

2025-02-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Ryosuke Niwa (rniwa) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/126996.diff 2 Files Affected: - (modified) clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.cpp (+5) - (modified) clang

[clang] [WebKit Checkers] Treat offsetof as a trivial expression. (PR #126996)

2025-02-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ryosuke Niwa (rniwa) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/126996.diff 2 Files Affected: - (modified) clang/lib/StaticAnalyzer/Checkers/WebKit/PtrTypesSemantics.cpp (+5) - (modified) clang/test/Analysis/Che

[clang] [HLSL] Implement HLSL intialization list support (PR #123141)

2025-02-12 Thread Tex Riddell via cfe-commits
https://github.com/tex3d commented: This is interesting. I wonder though what it looks like in the AST when initializing something with the result of a function call that return an aggregate that must be split up across different boundaries? Or what about expressions with side-effects? How

[clang] [WebKit Checkers] Treat offsetof as a trivial expression. (PR #126996)

2025-02-12 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/126996 None >From f7eafbfd258fb0acf60a01d033958f859c426ff3 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Wed, 12 Feb 2025 17:52:45 -0800 Subject: [PATCH] [WebKit Checkers] Treat offsetof as a trivial expression. --

[clang] [clang][analyzer] fix false positive of BlockInCriticalSectionChecker (PR #126752)

2025-02-12 Thread via cfe-commits
flovent wrote: I thought about the case when file descriptor equals to -1, which is modeled by `evalcall` for `open`, means that `open` failed to get a valid file descriptor, if we use this file descriptor in `read` or `recv`, they will not be blocked too. so I think we can avoid report for th

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

2025-02-12 Thread via cfe-commits
@@ -0,0 +1,44 @@ +/// Check DTLTO options are forwarded to the linker. + +// REQUIRES: lld + +// RUN: echo "-target x86_64-linux-gnu \ bd1976bris wrote: Done. Thanks. Apologies, I now recall you writing about this previously. https://github.com/llvm/llvm-project

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

2025-02-12 Thread via cfe-commits
@@ -0,0 +1,49 @@ +/// Simple test that DTLTO works with a single input file and generates the +/// expected set of files with --save-temps applied to the linker. +/// +/// Note that we also supply --save-temps to the compiler for predictable +/// bitcode file names. + +// RUN: rm

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

2025-02-12 Thread via cfe-commits
@@ -0,0 +1,49 @@ +/// Simple test that DTLTO works with a single input file and generates the +/// expected set of files with --save-temps applied to the linker. +/// +/// Note that we also supply --save-temps to the compiler for predictable +/// bitcode file names. + +// RUN: rm

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

2025-02-12 Thread via cfe-commits
@@ -0,0 +1,49 @@ +/// Simple test that DTLTO works with a single input file and generates the +/// expected set of files with --save-temps applied to the linker. +/// +/// Note that we also supply --save-temps to the compiler for predictable +/// bitcode file names. + +// RUN: rm

  1   2   3   4   5   6   >