[clang] [clang][transformer] Introduce a `constructExprArgs` range selector. (PR #95901)

2024-06-26 Thread Clement Courbet via cfe-commits
https://github.com/legrosbuffle updated https://github.com/llvm/llvm-project/pull/95901 >From 8f6ff99ddb035d63e99910f873a8d9938bd0b3e4 Mon Sep 17 00:00:00 2001 From: Clement Courbet Date: Mon, 17 Jun 2024 15:33:34 + Subject: [PATCH 1/2] [clang][transformer] Introduce a `constructExprArgs`

[clang] [MS ABI]: Support preserve_none in MS ABI (PR #96487)

2024-06-26 Thread Reid Kleckner via cfe-commits
https://github.com/rnk approved this pull request. Thanks! https://github.com/llvm/llvm-project/pull/96487 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] Revert "[AArch64] Add ability to list extensions enabled for a target" (PR #96768)

2024-06-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-flang-driver @llvm/pr-subscribers-clang-driver Author: Lucas Duarte Prates (pratlucas) Changes Reverts llvm/llvm-project#95805 due to test failures caught by the buildbots. --- Patch is 159.79 KiB, truncated to 20.00 KiB bel

[clang] [flang] [llvm] Revert "[AArch64] Add ability to list extensions enabled for a target" (PR #96768)

2024-06-26 Thread Lucas Duarte Prates via cfe-commits
https://github.com/pratlucas closed https://github.com/llvm/llvm-project/pull/96768 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang/AMDGPU: Use atomicrmw for ds fmin/fmax builtins (PR #96738)

2024-06-26 Thread Yaxun Liu via cfe-commits
@@ -158,23 +158,85 @@ void test_ds_faddf(local float *out, float src) { } // CHECK-LABEL: @test_ds_fmin -// CHECK: {{.*}}call{{.*}} float @llvm.amdgcn.ds.fmin.f32(ptr addrspace(3) %out, float %src, i32 0, i32 0, i1 false) +// CHECK: atomicrmw fmin ptr addrspace(3) %out, float

[clang] Clang: Support minimumnum and maximumnum intrinsics (PR #96281)

2024-06-26 Thread YunQiang Su via cfe-commits
@@ -3636,6 +3648,22 @@ def Fmin : FPMathTemplate, LibBuiltin<"math.h"> { let OnlyBuiltinPrefixedAliasIsConstexpr = 1; } +def FmaximumNum : FPMathTemplate, LibBuiltin<"math.h"> { wzssyqa wrote: Yes. They are in C23: https://libc.llvm.org/c23.html https://gi

[clang] [clang][Sema] Move the initializer lifetime checking code from SemaInit.cpp to a new place, NFC (PR #96758)

2024-06-26 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun edited https://github.com/llvm/llvm-project/pull/96758 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Move the initializer lifetime checking code from SemaInit.cpp to a new place, NFC (PR #96758)

2024-06-26 Thread Gábor Horváth via cfe-commits
https://github.com/Xazax-hun approved this pull request. https://github.com/llvm/llvm-project/pull/96758 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Move the initializer lifetime checking code from SemaInit.cpp to a new place, NFC (PR #96758)

2024-06-26 Thread Gábor Horváth via cfe-commits
@@ -0,0 +1,1258 @@ +//===--- CheckExprLifetime.cpp ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: A

[clang] [clang][Sema] Move the initializer lifetime checking code from SemaInit.cpp to a new place, NFC (PR #96758)

2024-06-26 Thread Gábor Horváth via cfe-commits
@@ -0,0 +1,1258 @@ +//===--- CheckExprLifetime.cpp ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: A

[clang] dead8f8 - [clang][Interp] Pointers into unknown-size arrays are never one-past-end

2024-06-26 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-06-26T16:12:13+02:00 New Revision: dead8f845f2549db5dec16b59b80d3e321948674 URL: https://github.com/llvm/llvm-project/commit/dead8f845f2549db5dec16b59b80d3e321948674 DIFF: https://github.com/llvm/llvm-project/commit/dead8f845f2549db5dec16b59b80d3e321948674.diff LO

[clang] [clang-tools-extra] [clang-format] Aggregate options regarding empty lines (PR #96770)

2024-06-26 Thread via cfe-commits
https://github.com/sstwcw created https://github.com/llvm/llvm-project/pull/96770 The new option is `KeepEmptyLines`. This patch was initially part of 9267f8f19a2e502e. I neglected to check the server builds before I added it. It broke clangd. Jie Fu fixed the problem in 4c91b49bab0728d4.

[clang] [clang-tools-extra] [clang-format] Aggregate options regarding empty lines (PR #96770)

2024-06-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: None (sstwcw) Changes The new option is `KeepEmptyLines`. This patch was initially part of 9267f8f19a2e502e. I neglected to check the server builds before I added it. It broke clangd. Jie Fu fixed the problem in 4c91b49bab

[clang] [compiler-rt] [ubsan] Display correct runtime messages for negative _BitInt (PR #93612)

2024-06-26 Thread via cfe-commits
earnol wrote: > Indeed, Clang doesn't provide int128_t for 32 bit targets, AFAIK. It looks like a little bit more complex. I checked with Standalone-i386 and AddressSanitizer-i386 targets. They do have int128_t for 32 bit targets as soon as clang itself built as 64-bit binary. > > Could you pl

[clang] nonblocking/nonallocating attributes (was: nolock/noalloc) (PR #84983)

2024-06-26 Thread Doug Wyatt via cfe-commits
dougsonos wrote: > So it sounds like the act of adding an additional trailing object will slow > down the performance regardless of whether we use the new trailing object? I was confused by some comments on `FunctionProtoType` which have diverged from the source, and thought that it was necess

[clang] [flang] [llvm] [AArch64] Add ability to list extensions enabled for a target (PR #95805)

2024-06-26 Thread Jon Roelofs via cfe-commits
jroelofs wrote: Looks like the new tests in `Driver` are missing `// REQUIRES: aarch64-registered-target` https://github.com/llvm/llvm-project/pull/95805 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang-tools-extra] 019f525 - [clang-tidy] add fixhint for misc-use-internal-linkage (#96203)

2024-06-26 Thread via cfe-commits
Author: Congcong Cai Date: 2024-06-26T22:30:15+08:00 New Revision: 019f525716348578802b02961c328b43f7cad0fb URL: https://github.com/llvm/llvm-project/commit/019f525716348578802b02961c328b43f7cad0fb DIFF: https://github.com/llvm/llvm-project/commit/019f525716348578802b02961c328b43f7cad0fb.diff

[clang-tools-extra] [clang-tidy] add fixhint for misc-use-internal-linkage (PR #96203)

2024-06-26 Thread Congcong Cai via cfe-commits
https://github.com/HerrCai0907 closed https://github.com/llvm/llvm-project/pull/96203 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc] [llvm] [libc] Implement (v|f)printf on the GPU (PR #96369)

2024-06-26 Thread Yaxun Liu via cfe-commits
@@ -0,0 +1,77 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// RUN: %clang_cc1 -triple nvptx64-nvidia-cuda -emit-llvm -o - %s | FileCheck %s + +extern void varargs_simple(int, ...); + +// CHECK-LABEL: define dso_local vo

[clang-tools-extra] [clang-tidy] add fixhint for misc-use-internal-linkage (PR #96203)

2024-06-26 Thread Piotr Zegar via cfe-commits
@@ -25,3 +25,16 @@ Example: } // already declared as extern extern int v2; + +Options +--- + +.. option:: FixMode PiotrZSL wrote: should say what is default value https://github.com/llvm/llvm-project/pull/96203 __

[clang] [libc] [llvm] [libc] Implement (v|f)printf on the GPU (PR #96369)

2024-06-26 Thread Yaxun Liu via cfe-commits
@@ -0,0 +1,77 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// RUN: %clang_cc1 -triple nvptx64-nvidia-cuda -emit-llvm -o - %s | FileCheck %s + +extern void varargs_simple(int, ...); + +// CHECK-LABEL: define dso_local vo

[clang] [clang][Sema] Move the initializer lifetime checking code from SemaInit.cpp to a new place, NFC (PR #96758)

2024-06-26 Thread Ilya Biryukov via cfe-commits
@@ -0,0 +1,1258 @@ +//===--- CheckExprLifetime.cpp ===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: A

[clang] [clang][Sema] Move the initializer lifetime checking code from SemaInit.cpp to a new place, NFC (PR #96758)

2024-06-26 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov approved this pull request. LGTM, this opens up the possibility to extend this for assignments and provides better modularity! https://github.com/llvm/llvm-project/pull/96758 ___ cfe-commits mailing list cfe-commits@li

[clang] Clang: Add warning flag for storage class specifiers on explicit specializations (PR #96699)

2024-06-26 Thread via cfe-commits
https://github.com/alexfh approved this pull request. LGTM Thank you! https://github.com/llvm/llvm-project/pull/96699 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [AArch64] Add ability to list extensions enabled for a target (PR #95805)

2024-06-26 Thread Lucas Duarte Prates via cfe-commits
pratlucas wrote: > Looks like the new tests in `Driver` are missing `// REQUIRES: > aarch64-registered-target` Yes, I'm adding those now. There was also an odd ThreadSanitizer failure in clangd (https://lab.llvm.org/buildbot/#/builders/134/builds/680), which I'm investigating to check if is i

[clang] [llvm] [clang][docs] Add preliminary documentation for SPIR-V support in the HIPAMD ToolChain (PR #96657)

2024-06-26 Thread Yaxun Liu via cfe-commits
@@ -284,3 +284,48 @@ Example Usage Base* basePtr = &obj; basePtr->virtualFunction(); // Allowed since obj is constructed in device code } + +SPIR-V Support on HIPAMD ToolChain +== + +The HIPAMD ToolChain supports targetting +`AMDG

[clang] [clang][NFC] Move more things out of `SemaChecking.cpp` (PR #96641)

2024-06-26 Thread Chris B via cfe-commits
https://github.com/llvm-beanz approved this pull request. HLSL changes look good to me. https://github.com/llvm/llvm-project/pull/96641 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Clang: convert `__m64` intrinsics to unconditionally use SSE2 instead of MMX. (PR #96540)

2024-06-26 Thread James Y Knight via cfe-commits
jyknight wrote: > Really, the question is whether we plan to completely drop support for the > x86_mmx type (including inline asm operands/results) Yes, I do think it would be good to eliminate the type. For inline-asm, we could switch to using a standard IR vector type for "y" constraint ope

[clang] [llvm] [clang][docs] Add preliminary documentation for SPIR-V support in the HIPAMD ToolChain (PR #96657)

2024-06-26 Thread Yaxun Liu via cfe-commits
@@ -284,3 +284,48 @@ Example Usage Base* basePtr = &obj; basePtr->virtualFunction(); // Allowed since obj is constructed in device code } + +SPIR-V Support on HIPAMD ToolChain +== + +The HIPAMD ToolChain supports targetting +`AMDG

[clang] [libc] [llvm] [libc] Implement (v|f)printf on the GPU (PR #96369)

2024-06-26 Thread Joseph Huber via cfe-commits
@@ -0,0 +1,77 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// RUN: %clang_cc1 -triple nvptx64-nvidia-cuda -emit-llvm -o - %s | FileCheck %s + +extern void varargs_simple(int, ...); + +// CHECK-LABEL: define dso_local vo

[clang-tools-extra] [clang-tidy] add default value for misc-use-internal-linkage [NFC] (PR #96779)

2024-06-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Congcong Cai (HerrCai0907) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/96779.diff 1 Files Affected: - (modified) clang-tools-extra/docs/clang-tidy/checks/misc/use-internal-linkage.rst (+1-1) ``diff

[clang-tools-extra] [clang-tidy] add fixhint for misc-use-internal-linkage (PR #96203)

2024-06-26 Thread Congcong Cai via cfe-commits
@@ -25,3 +25,16 @@ Example: } // already declared as extern extern int v2; + +Options +--- + +.. option:: FixMode HerrCai0907 wrote: #96779 https://github.com/llvm/llvm-project/pull/96203 ___ cfe-commits

[clang] [llvm] [RISCV] Add support for getHostCPUFeatures using hwprobe (PR #94352)

2024-06-26 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: Any thoughts? Hopefully I can catch up with the 19 release :) https://github.com/llvm/llvm-project/pull/94352 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Improve PointerSubChecker (PR #96501)

2024-06-26 Thread Donát Nagy via cfe-commits
NagyDonat wrote: > These results look correct according to the checker, but I am not sure if > such results are useful or really invalid: > https://codechecker-demo.eastus.cloudapp.azure.com/Default/reports?run=vim_v8.2.1920_pointersub1&is-unique=on&diff-type=New&checker-name=alpha.core.Pointer

[clang] [flang] [llvm] [AArch64] Add ability to list extensions enabled for a target (PR #95805)

2024-06-26 Thread David Spickett via cfe-commits
DavidSpickett wrote: I very much doubt it is, your change is still in the next build (https://lab.llvm.org/buildbot/#/builders/134/builds/681) and that's green. https://github.com/llvm/llvm-project/pull/95805 ___ cfe-commits mailing list cfe-commits@l

[clang] [Driver] Support using toolchain libc and libc++ for baremetal (PR #96736)

2024-06-26 Thread Nick Desaulniers via cfe-commits
@@ -296,6 +300,47 @@ void BareMetal::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs, return; const Driver &D = getDriver(); + std::string Target = getTripleString(); + + auto AddCXXIncludePath = [&](StringRef Path) { +std::string Version = detectLibcxxVers

[clang] [Driver] Support using toolchain libc and libc++ for baremetal (PR #96736)

2024-06-26 Thread Nick Desaulniers via cfe-commits
@@ -296,6 +300,47 @@ void BareMetal::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs, return; const Driver &D = getDriver(); + std::string Target = getTripleString(); + + auto AddCXXIncludePath = [&](StringRef Path) { +std::string Version = detectLibcxxVers

[clang] [Driver] Support using toolchain libc and libc++ for baremetal (PR #96736)

2024-06-26 Thread Nick Desaulniers via cfe-commits
@@ -296,6 +300,47 @@ void BareMetal::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs, return; const Driver &D = getDriver(); + std::string Target = getTripleString(); + + auto AddCXXIncludePath = [&](StringRef Path) { nickdesaulniers wrote: Is

[clang] [Driver] Support using toolchain libc and libc++ for baremetal (PR #96736)

2024-06-26 Thread Nick Desaulniers via cfe-commits
@@ -296,6 +300,47 @@ void BareMetal::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs, return; const Driver &D = getDriver(); + std::string Target = getTripleString(); + + auto AddCXXIncludePath = [&](StringRef Path) { +std::string Version = detectLibcxxVers

[clang] [Driver] Support using toolchain libc and libc++ for baremetal (PR #96736)

2024-06-26 Thread Nick Desaulniers via cfe-commits
@@ -296,6 +300,47 @@ void BareMetal::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs, return; const Driver &D = getDriver(); + std::string Target = getTripleString(); + + auto AddCXXIncludePath = [&](StringRef Path) { +std::string Version = detectLibcxxVers

[clang] [ParserHLSL] Attempt to parse HLSL annotations on Field Decls. (PR #96346)

2024-06-26 Thread Chris B via cfe-commits
@@ -0,0 +1,18 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -o - %s -verify + +// expected-no-diagnostics + +struct MyBitFields { +unsigned int field1 : 3; // 3 bits for field1 +unsigned int field2 : 4; // 4 bits for field2 +int field3 : 5;

[clang] [ParserHLSL] Attempt to parse HLSL annotations on Field Decls. (PR #96346)

2024-06-26 Thread Chris B via cfe-commits
@@ -0,0 +1,30 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -o - %s -verify + +// previously, this test would result in an error shown below on the line that +// declares variable a in struct Eg9: +// error: use of undeclared identifier +// 'SV_Dispat

[clang] [flang] [Flang-new][OpenMP] Add offload related flags for AMDGPU (PR #96742)

2024-06-26 Thread Dominik Adamski via cfe-commits
https://github.com/DominikAdamski updated https://github.com/llvm/llvm-project/pull/96742 >From 5b487aac3c8414b6f37f6888f361ca7488094048 Mon Sep 17 00:00:00 2001 From: Dominik Adamski Date: Fri, 21 Jun 2024 18:03:53 +0200 Subject: [PATCH] [Flang-new][OpenMP] Add offload related flags for AMDGPU

[clang] [clang][analyzer] Improve PointerSubChecker (PR #96501)

2024-06-26 Thread Balázs Kéri via cfe-commits
balazske wrote: The warning message may be still misleading if the LHS or RHS "arrays" are non-array variables. Is it better to improve the messages in this case (or detect if `offsetof` can be used and include it in the message)? https://github.com/llvm/llvm-project/pull/96501 ___

[clang] [Doc] Update documentation for no-transitive-change (PR #96453)

2024-06-26 Thread Ilya Biryukov via cfe-commits
@@ -652,6 +652,134 @@ in the future. The expected roadmap for Reduced BMIs as of Clang 19.x is: comes, the term BMI will refer to the Reduced BMI and the Full BMI will only be meaningful to build systems which elect to support two-phase compilation. +Experimental No Tra

[clang] [Doc] Update documentation for no-transitive-change (PR #96453)

2024-06-26 Thread Ilya Biryukov via cfe-commits
@@ -652,6 +652,141 @@ in the future. The expected roadmap for Reduced BMIs as of Clang 19.x is: comes, the term BMI will refer to the Reduced BMI and the Full BMI will only be meaningful to build systems which elect to support two-phase compilation. +Experimental No Tra

[clang] [Doc] Update documentation for no-transitive-change (PR #96453)

2024-06-26 Thread Ilya Biryukov via cfe-commits
@@ -652,6 +652,134 @@ in the future. The expected roadmap for Reduced BMIs as of Clang 19.x is: comes, the term BMI will refer to the Reduced BMI and the Full BMI will only be meaningful to build systems which elect to support two-phase compilation. +Experimental No Tra

[clang] [Doc] Update documentation for no-transitive-change (PR #96453)

2024-06-26 Thread Ilya Biryukov via cfe-commits
@@ -229,6 +229,10 @@ C++20 Feature Support will now work. (#GH62925). +- Clang refactored the BMI format to make it possible to support no transitive changes ilya-biryukov wrote: > Good suggestions. Applied. (Just change should to can. Since I feel shoul

[clang] [llvm] [RISCV] Add support for getHostCPUFeatures using hwprobe (PR #94352)

2024-06-26 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/94352 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [mlir] [OMPIRBuilder] - Handle dependencies in `createTarget` (PR #93977)

2024-06-26 Thread Pranav Bhandarkar via cfe-commits
@@ -5229,13 +5382,284 @@ static void emitTargetOutlinedFunction( OMPBuilder.emitTargetRegionFunction(EntryInfo, GenerateOutlinedFunction, true, OutlinedFn, OutlinedFnID); } +OpenMPIRBuilder::InsertPointTy OpenMPIRBuilder::emitTargetTask(

[clang] [compiler-rt] [libcxx] [libunwind] [llvm] [openmp] [cmake] switch to CMake's native `check_{compiler,linker}_flag` (PR #96171)

2024-06-26 Thread Louis Dionne via cfe-commits
ldionne wrote: I'm sorry to be the bearer of bad news, but it looks like Android is failing with this patch: https://buildkite.com/llvm-project/libcxx-ci/builds/35981#01905269-56a0-4314-a350-0b99ece37e89 This is kinda weird, it fails due to the ABI list changing. I checked other recent execut

[clang] [compiler-rt] [llvm] [openmp] [PGO][Offload] Profile profraw generation for GPU instrumentation #76587 (PR #93365)

2024-06-26 Thread Johannes Doerfert via cfe-commits
@@ -1274,4 +1277,97 @@ COMPILER_RT_VISIBILITY int __llvm_profile_set_file_object(FILE *File, return 0; } +int __llvm_write_custom_profile(const char *Target, +const __llvm_profile_data *DataBegin, +const __llvm

[clang] [compiler-rt] [llvm] [openmp] [PGO][Offload] Profile profraw generation for GPU instrumentation #76587 (PR #93365)

2024-06-26 Thread Johannes Doerfert via cfe-commits
@@ -296,6 +296,17 @@ int __llvm_profile_get_padding_sizes_for_counters( */ void __llvm_profile_set_dumped(); +/*! + * \brief Write custom target-specific profiling data to a seperate file. + * Used by libomptarget for GPU PGO. jdoerfert wrote: ```suggestion

[clang] [compiler-rt] [llvm] [openmp] [PGO][Offload] Profile profraw generation for GPU instrumentation #76587 (PR #93365)

2024-06-26 Thread Johannes Doerfert via cfe-commits
@@ -829,6 +829,25 @@ Error GenericDeviceTy::deinit(GenericPluginTy &Plugin) { DeviceMemoryPoolTracking.AllocationMax); } + for (auto *Image : LoadedImages) { +GenericGlobalHandlerTy &Handler = Plugin.getGlobalHandler(); +if (!Handler.hasProfilingGlobals(*

[clang] [compiler-rt] [llvm] [openmp] [PGO][Offload] Profile profraw generation for GPU instrumentation #76587 (PR #93365)

2024-06-26 Thread Johannes Doerfert via cfe-commits
@@ -829,6 +829,25 @@ Error GenericDeviceTy::deinit(GenericPluginTy &Plugin) { DeviceMemoryPoolTracking.AllocationMax); } + for (auto *Image : LoadedImages) { +GenericGlobalHandlerTy &Handler = Plugin.getGlobalHandler(); +if (!Handler.hasProfilingGlobals(*

[clang] [llvm] [RISCV] Bump Pointer Masking extension version (PR #96715)

2024-06-26 Thread Michael Maitland via cfe-commits
https://github.com/michaelmaitland updated https://github.com/llvm/llvm-project/pull/96715 >From f6a4cf6b13442deac91c9ee49b7ba97617508c9d Mon Sep 17 00:00:00 2001 From: Michael Maitland Date: Tue, 25 Jun 2024 16:35:25 -0700 Subject: [PATCH 1/3] [RISCV] Bump Pointer Masking extension version --

[clang] [flang] [llvm] Re-land: "[AArch64] Add ability to list extensions enabled for a target" (#95805) (PR #96795)

2024-06-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Lucas Duarte Prates (pratlucas) Changes This introduces the new `--print-enabled-extensions` command line option to AArch64, which prints the list of extensions that are enabled for the target specified by the combination of `--target`/`-ma

[clang] [flang] [llvm] Re-land: "[AArch64] Add ability to list extensions enabled for a target" (#95805) (PR #96795)

2024-06-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Lucas Duarte Prates (pratlucas) Changes This introduces the new `--print-enabled-extensions` command line option to AArch64, which prints the list of extensions that are enabled for the target specified by the combination of `--targe

[clang] [flang] [llvm] Re-land: "[AArch64] Add ability to list extensions enabled for a target" (#95805) (PR #96795)

2024-06-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-mc Author: Lucas Duarte Prates (pratlucas) Changes This introduces the new `--print-enabled-extensions` command line option to AArch64, which prints the list of extensions that are enabled for the target specified by the combination of `--target`/`-march

[clang] [flang] [llvm] Re-land: "[AArch64] Add ability to list extensions enabled for a target" (#95805) (PR #96795)

2024-06-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-flang-driver Author: Lucas Duarte Prates (pratlucas) Changes This introduces the new `--print-enabled-extensions` command line option to AArch64, which prints the list of extensions that are enabled for the target specified by the combination of `--targe

[clang] [flang] [llvm] [AArch64] Add ability to list extensions enabled for a target (PR #95805)

2024-06-26 Thread Lucas Duarte Prates via cfe-commits
pratlucas wrote: Good catch. I also wasn't able to reproduce it locally. I've created #96795 to re-land the changes with the updated tests. https://github.com/llvm/llvm-project/pull/95805 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://

[clang] [flang] [llvm] Re-land: "[AArch64] Add ability to list extensions enabled for a target" (#95805) (PR #96795)

2024-06-26 Thread Jonathan Thackray via cfe-commits
https://github.com/jthackray commented: LGTM so far. Just a couple of minor comments. https://github.com/llvm/llvm-project/pull/96795 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] Re-land: "[AArch64] Add ability to list extensions enabled for a target" (#95805) (PR #96795)

2024-06-26 Thread Jonathan Thackray via cfe-commits
https://github.com/jthackray edited https://github.com/llvm/llvm-project/pull/96795 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] Re-land: "[AArch64] Add ability to list extensions enabled for a target" (#95805) (PR #96795)

2024-06-26 Thread Jonathan Thackray via cfe-commits
@@ -343,7 +350,9 @@ bool isX18ReservedByDefault(const Triple &TT); // themselves, they are sequential (0, 1, 2, 3, ...). uint64_t getCpuSupportsMask(ArrayRef FeatureStrs); -void PrintSupportedExtensions(StringMap DescMap); +void PrintSupportedExtensions(); + +void printEnabled

[clang] [flang] [llvm] Re-land: "[AArch64] Add ability to list extensions enabled for a target" (#95805) (PR #96795)

2024-06-26 Thread Jonathan Thackray via cfe-commits
@@ -9,28 +9,46 @@ // //===--===// -// A SubtargetFeature that can be toggled from the command line, and therefore -// has an AEK_* entry in ArmExtKind. +// A SubtargetFeature that represents one or more Archi

[clang] [flang] [Flang] Re-enable -print-resource-dir compiler option (PR #96799)

2024-06-26 Thread Michael Klemm via cfe-commits
https://github.com/mjklemm created https://github.com/llvm/llvm-project/pull/96799 This PR re-enables the command line option `-print-resources-dir` after PR #96557 has reverted the changes made. The way this works now, is that it simply prints the current resource dir, which points to clang/

[clang] [flang] [Flang] Re-enable -print-resource-dir compiler option (PR #96799)

2024-06-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Michael Klemm (mjklemm) Changes This PR re-enables the command line option `-print-resources-dir` after PR #96557 has reverted the changes made. The way this works now, is that it simply prints the current resource dir, which points to c

[clang-tools-extra] Enforce SL.con.3: Add check to replace operator[] with at() [Cont.] (PR #95220)

2024-06-26 Thread Paul Heidekrüger via cfe-commits
PBHDK wrote: > The name sounds nice. Thanks. > Please address the concerns here and in #90043 to always suggest `at` as > well. An option to enable suggesting and providing a fix to use `at` (or > `gsl::at`), like others have suggested, sounds like the best option. Thank you for taking another

[clang] [flang] [Flang-new][OpenMP] Add offload related flags for AMDGPU (PR #96742)

2024-06-26 Thread Andrzej Warzyński via cfe-commits
https://github.com/banach-space commented: > fcuda-is-device flag is not used by Flang currently. In the future it will be > needed for Flang equivalent functions: > AMDGPUTargetCodeGenInfo::getGlobalVarAddressSpace > AMDGPUTargetInfo::getTargetDefines . I don't follow - why would anything re

[clang] [flang] [Flang-new][OpenMP] Add offload related flags for AMDGPU (PR #96742)

2024-06-26 Thread Andrzej Warzyński via cfe-commits
https://github.com/banach-space edited https://github.com/llvm/llvm-project/pull/96742 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [Flang-new][OpenMP] Add offload related flags for AMDGPU (PR #96742)

2024-06-26 Thread Andrzej Warzyński via cfe-commits
@@ -333,6 +333,9 @@ void Flang::AddAMDGPUTargetArgs(const ArgList &Args, StringRef Val = A->getValue(); CmdArgs.push_back(Args.MakeArgString("-mcode-object-version=" + Val)); } + + const ToolChain &TC = getToolChain(); + TC.addClangTargetOptions(Args, CmdArgs, Actio

[clang] [HIP][Clang][Sema] Fix crash when calling builtins with pointer arguments (PR #95957)

2024-06-26 Thread Raymond Tian via cfe-commits
rymdtian wrote: > you have test failure > https://buildkite.com/llvm-project/github-pull-requests/builds/73905#01902d01-7814-41af-b8e6-4d7d258fd4ec > and > https://buildkite.com/llvm-project/github-pull-requests/builds/73905#01902d01-7817-438a-b2cc-554580bfe611. > Need to get it fixed before

[clang] [HIP][Clang][Sema] Fix crash when calling builtins with pointer arguments (PR #95957)

2024-06-26 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu approved this pull request. https://github.com/llvm/llvm-project/pull/95957 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Allow ternary in all templates (PR #96801)

2024-06-26 Thread Emilia Kond via cfe-commits
https://github.com/rymiel created https://github.com/llvm/llvm-project/pull/96801 Currently, question mark and colon tokens are not allowed between angle brackets, as a template argument, if we are in an expression context. However, expressions can still allowed in non-expression contexts, lea

[clang] [clang-format] Allow ternary in all templates (PR #96801)

2024-06-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Emilia Kond (rymiel) Changes Currently, question mark and colon tokens are not allowed between angle brackets, as a template argument, if we are in an expression context. However, expressions can still allowed in non-expression con

[clang] [clang-format] Allow ternary in all templates (PR #96801)

2024-06-26 Thread Emilia Kond via cfe-commits
rymiel wrote: I'm not even sure if this change is a good idea! I think it's very likely it will lead to regressions, for we don't have tests for such cases yet, it seems https://github.com/llvm/llvm-project/pull/96801 ___ cfe-commits mailing list cfe-

[clang] [compiler-rt] [compiler-rt] Realtime Sanitizer: Introduce Realtime Sanitizer (RTSan) backend (PR #92460)

2024-06-26 Thread Chris Apple via cfe-commits
cjappl wrote: Bumped the branch to resolve the conflict in config-ix.cmake https://github.com/llvm/llvm-project/pull/92460 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Bump Pointer Masking extension version (PR #96715)

2024-06-26 Thread Jesse Huang via cfe-commits
https://github.com/jaidTw approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/96715 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Bump Pointer Masking extension version (PR #96715)

2024-06-26 Thread Craig Topper via cfe-commits
@@ -184,6 +184,7 @@ Changes to the RISC-V Backend * B (the collection of the Zba, Zbb, Zbs extensions) is supported. * Added smcdeleg, ssccfg, smcsrind, and sscsrind extensions to -march. * ``-mcpu=syntacore-scr3-rv32`` and ``-mcpu=syntacore-scr3-rv64`` were added. +* Ssnpm, Sm

[clang] [flang] [llvm] Re-land: "[AArch64] Add ability to list extensions enabled for a target" (#95805) (PR #96795)

2024-06-26 Thread Jon Roelofs via cfe-commits
@@ -21,7 +21,7 @@ // RUN: %clang --target=aarch64 -march=armv8a+fp16fml -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV8A-FP16FML %s jroelofs wrote: needs a `// REQUIRES: aarch64-registered-target`. Ditto for all the rest of the `aarch64-*` files being mo

[clang] [flang] [llvm] Re-land: "[AArch64] Add ability to list extensions enabled for a target" (#95805) (PR #96795)

2024-06-26 Thread Jon Roelofs via cfe-commits
@@ -315,37 +315,37 @@ // RUN: %clang -target aarch64 -mcpu=thunderx2t99 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MCPU-THUNDERX2T99 %s // RUN: %clang -target aarch64 -mcpu=a64fx -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-MCPU-A64FX %s // RUN: %clang -target aarch64

[clang] [llvm] [RISCV] Bump Pointer Masking extension version (PR #96715)

2024-06-26 Thread Michael Maitland via cfe-commits
https://github.com/michaelmaitland updated https://github.com/llvm/llvm-project/pull/96715 >From f6a4cf6b13442deac91c9ee49b7ba97617508c9d Mon Sep 17 00:00:00 2001 From: Michael Maitland Date: Tue, 25 Jun 2024 16:35:25 -0700 Subject: [PATCH 1/4] [RISCV] Bump Pointer Masking extension version --

[clang] [llvm] [RISCV] Bump Pointer Masking extension version (PR #96715)

2024-06-26 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/96715 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lldb] [clang][lldb] Don't assert structure layout correctness for layouts provided by LLDB (PR #93809)

2024-06-26 Thread David Blaikie via cfe-commits
dwblaikie wrote: Ah, I think this right solution to /this/ case is that the compiler should be emitting the alignment for the structure? Like there's no way for the debugger to know that this structure is underaligned at the moment: ``` struct __attribute__((packed)) t1 { int i; }; ``` Which

[clang] [lldb] [clang][lldb] Don't assert structure layout correctness for layouts provided by LLDB (PR #93809)

2024-06-26 Thread David Blaikie via cfe-commits
dwblaikie wrote: oh, slight misquote above - `aligned(1)` is a no-op, as that attribute can't reduce the alignment... But I think my argument still stands, roughly as - if increases in alignment are explicitly specified, decreases in alignment should be too. https://github.com/llvm/llvm-proj

[clang] [lldb] [clang][lldb] Don't assert structure layout correctness for layouts provided by LLDB (PR #93809)

2024-06-26 Thread David Blaikie via cfe-commits
dwblaikie wrote: The other effects of `packed` are encoded (the changes to the member offsets) but that's not the only effect, and we shouldn't use that effect (which isn't guaranteed to be observable - as in the case of "packed struct with a single member/that just happens to not have padding

[clang] [clang-format] Introduce "ReflowComments: IndentOnly" to re-indent comments without breaking internal structure (think Doxygen). (PR #96804)

2024-06-26 Thread Iuri Chaer via cfe-commits
https://github.com/ichaer created https://github.com/llvm/llvm-project/pull/96804 * Convert `ReflowComments` from boolean into a new `enum` which can take on the value `RCS_Never`, `RCS_IndentOnly`, or `RCS_Always`. The first one is equivalent to the old `false`, the third one is `true`, and t

[clang] [clang-format] Introduce "ReflowComments: IndentOnly" to re-indent comments without breaking internal structure (think Doxygen). (PR #96804)

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

[clang] [clang-format] Introduce "ReflowComments: IndentOnly" to re-indent comments without breaking internal structure (think Doxygen). (PR #96804)

2024-06-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Iuri Chaer (ichaer) Changes * Convert `ReflowComments` from boolean into a new `enum` which can take on the value `RCS_Never`, `RCS_IndentOnly`, or `RCS_Always`. The first one is equivalent to the old `false`, the third one is `tru

[clang] [TBAA] Emit distinct TBAA tags for pointers with different depths,types. (PR #76612)

2024-06-26 Thread John McCall via cfe-commits
@@ -185,10 +185,33 @@ llvm::MDNode *CodeGenTBAA::getTypeInfoHelper(const Type *Ty) { return getChar(); // Handle pointers and references. - // TODO: Implement C++'s type "similarity" and consider dis-"similar" - // pointers distinct. - if (Ty->isPointerType() || Ty->

[clang] [TBAA] Emit distinct TBAA tags for pointers with different depths,types. (PR #76612)

2024-06-26 Thread John McCall via cfe-commits
https://github.com/rjmccall commented: Generally looking good. https://github.com/llvm/llvm-project/pull/76612 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [TBAA] Emit distinct TBAA tags for pointers with different depths,types. (PR #76612)

2024-06-26 Thread John McCall via cfe-commits
https://github.com/rjmccall edited https://github.com/llvm/llvm-project/pull/76612 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [TBAA] Emit distinct TBAA tags for pointers with different depths,types. (PR #76612)

2024-06-26 Thread John McCall via cfe-commits
@@ -185,10 +185,33 @@ llvm::MDNode *CodeGenTBAA::getTypeInfoHelper(const Type *Ty) { return getChar(); // Handle pointers and references. rjmccall wrote: Probably worth putting standard citations here: ```suggestion // Handle pointers and references.

[clang] [flang] [mlir] Avoid object libraries in the VS IDE (PR #93519)

2024-06-26 Thread via cfe-commits
dpalermo wrote: This patch breaks the build of flang when quad math support is enabled (https://github.com/llvm/llvm-project/pull/81971). Quad math support is off by default (why no buildbot tripper over this), and can be enabled by setting the following cmake variable: -DFLANG_RUNTIME_F128

[clang] [lldb] [clang][lldb] Don't assert structure layout correctness for layouts provided by LLDB (PR #93809)

2024-06-26 Thread David Blaikie via cfe-commits
dwblaikie wrote: Here's the smallest patch that would put explicit alignment on any packed structure: ``` diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp index a072475ba770..bbb13ddd593b 100644 --- a/clang/lib/CodeGen/CGDebugInfo.cpp +++ b/clang/lib/CodeGen/CG

[clang] [lldb] [clang][lldb] Don't assert structure layout correctness for layouts provided by LLDB (PR #93809)

2024-06-26 Thread David Blaikie via cfe-commits
dwblaikie wrote: Oh, this code was touched really recently in 66df6141659375e738d9b9b74bf79b2317576042 (@augusto2112 ) (see notes in previous comments about how this code should be generalized) https://github.com/llvm/llvm-project/pull/93809 ___ cfe-

[clang] [llvm] Add __hlt intrinsic for Windows ARM. (PR #96578)

2024-06-26 Thread Amy Huang via cfe-commits
https://github.com/amykhuang updated https://github.com/llvm/llvm-project/pull/96578 >From 1b436900146e1a91efac95416077485571722517 Mon Sep 17 00:00:00 2001 From: Amy Huang Date: Mon, 24 Jun 2024 16:55:08 -0700 Subject: [PATCH 1/2] Add __hlt intrinsic for Windows ARM. --- clang/include/clang/

[clang] [llvm] Add __hlt intrinsic for Windows ARM. (PR #96578)

2024-06-26 Thread Amy Huang via cfe-commits
https://github.com/amykhuang edited https://github.com/llvm/llvm-project/pull/96578 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-doc] Improve performance by adding a short circuit (PR #96809)

2024-06-26 Thread via cfe-commits
https://github.com/PeterChou1 created https://github.com/llvm/llvm-project/pull/96809 This patch adds a short circuit which address performance problem referenced in issue: https://github.com/llvm/llvm-project/issues/96570 >From my local testing it cut the runtime of generating LLVM docs from

[clang-tools-extra] [clang-doc] Improve performance by adding a short circuit (PR #96809)

2024-06-26 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: None (PeterChou1) Changes This patch adds a short circuit which address performance problem referenced in issue: https://github.com/llvm/llvm-project/issues/96570 >From my local testing it cut the runtime of generating LLVM do

<    1   2   3   4   >