[clang-tools-extra] [clangd] Add inlay hints for default function arguments (PR #95712)

2024-10-08 Thread Nathan Ridge via cfe-commits
@@ -1681,6 +1681,15 @@ enum class InlayHintKind { /// This is a clangd extension. BlockEnd = 4, + /// An inlay hint that is for a default argument. + /// + /// An example of a parameter hint for a default argument: + ///void foo(bool A = true); + ///foo(^); +

[clang-tools-extra] [clangd] Add inlay hints for default function arguments (PR #95712)

2024-10-08 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 edited https://github.com/llvm/llvm-project/pull/95712 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Add inlay hints for default function arguments (PR #95712)

2024-10-08 Thread Nathan Ridge via cfe-commits
@@ -1465,6 +1469,34 @@ TEST(TypeHints, DefaultTemplateArgs) { ExpectedHint{": A", "binding"}); } +TEST(DefaultArguments, Smoke) { + Config Cfg; + Cfg.InlayHints.Parameters = + true; // To test interplay of parameters and default parameters + Cfg.Inlay

[clang-tools-extra] [clangd] Add inlay hints for default function arguments (PR #95712)

2024-10-08 Thread Nathan Ridge via cfe-commits
@@ -372,6 +381,25 @@ maybeDropCxxExplicitObjectParameters(ArrayRef Params) { return Params; } +template +std::string joinAndTruncate(R &&Range, size_t MaxLength, HighCommander4 wrote: Now that the function has only one call site, can we drop the `GetAsStr

[clang-tools-extra] [clangd] Add inlay hints for default function arguments (PR #95712)

2024-10-08 Thread Nathan Ridge via cfe-commits
@@ -709,7 +738,8 @@ class InlayHintVisitor : public RecursiveASTVisitor { private: using NameVec = SmallVector; - void processCall(Callee Callee, llvm::ArrayRef Args) { + void processCall(Callee Callee, SourceRange RParenOrBraceRange, HighCommander4 wrote

[clang-tools-extra] [clangd] Add inlay hints for default function arguments (PR #95712)

2024-10-08 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 commented: Thanks for the update! The patch is looking pretty good, just some minor comments remaining and then it should be good to go. https://github.com/llvm/llvm-project/pull/95712 ___ cfe-commits mailing list cf

[clang] [llvm] Thin3 (PR #108614)

2024-10-08 Thread Kyungwoo Lee via cfe-commits
https://github.com/kyulee-com updated https://github.com/llvm/llvm-project/pull/108614 >From 411fc459e58a65d9599c917f220ba68bb799baac Mon Sep 17 00:00:00 2001 From: Kyungwoo Lee Date: Fri, 13 Sep 2024 08:51:00 -0700 Subject: [PATCH 1/5] [CGData][ThinLTO] Global Outlining with Two-CodeGen Round

[clang] ada6372 - Revert "[clang] Finish implementation of P0522 (#96023)"

2024-10-08 Thread Hans Wennborg via cfe-commits
Author: Hans Wennborg Date: 2024-10-09T08:41:42+02:00 New Revision: ada6372e52547ba0090f52a2e9e9d95d7eca28d3 URL: https://github.com/llvm/llvm-project/commit/ada6372e52547ba0090f52a2e9e9d95d7eca28d3 DIFF: https://github.com/llvm/llvm-project/commit/ada6372e52547ba0090f52a2e9e9d95d7eca28d3.diff

[clang] [clang] Finish implementation of P0522 (PR #96023)

2024-10-08 Thread via cfe-commits
zmodem wrote: I'll revert to unbreak trunk in the meantime. https://github.com/llvm/llvm-project/pull/96023 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [lld][LoongArch] Enable relaxation when --relax option is passed (PR #111488)

2024-10-08 Thread via cfe-commits
@@ -1462,6 +1462,8 @@ template void Writer::finalizeAddressDependentContent() { for (;;) { bool changed = ctx.target->needsThunks ? tc.createThunks(pass, ctx.outputSections) + : ctx.arg.emachine == EM_LOONGARCH && !ctx.arg.relax

[clang] [Clang][perf-training] Do build of libLLVMSupport for perf training (PR #111625)

2024-10-08 Thread Aiden Grossman via cfe-commits
https://github.com/boomanaiden154 commented: This looks very interesting! Thanks for taking the time to collect all the numbers. It definitely seems like collecting proper profiles for BOLT is something that we want to do, at least for the CI compiler, given the numbers here. I'm assuming you

[clang] [Clang][perf-training] Do build of libLLVMSupport for perf training (PR #111625)

2024-10-08 Thread Aiden Grossman via cfe-commits
@@ -0,0 +1,2 @@ +RUN: %cmake -G %cmake_generator -B %t -S %llvm_src_dir -DCMAKE_C_COMPILER=%clang -DCMAKE_CXX_COMPILER=%clang -DCMAKE_CXX_FLAGS="--driver-mode=g++" -DCMAKE_BUILD_TYPE=Release boomanaiden154 wrote: Why the `--driver-mode=g++` flag here? https://

[clang] [Clang][perf-training] Do build of libLLVMSupport for perf training (PR #111625)

2024-10-08 Thread Aiden Grossman via cfe-commits
@@ -34,8 +34,12 @@ config.test_format = lit.formats.ShTest(use_lit_shell == "0") config.substitutions.append( ('%clang_cpp_skip_driver', ' %s %s %s ' % (cc1_wrapper, config.clang, sysroot_flags))) config.substitutions.append( ('%clang_cpp', ' %s --driver-mode=g++ %s ' % (confi

[clang] [Clang][perf-training] Do build of libLLVMSupport for perf training (PR #111625)

2024-10-08 Thread Aiden Grossman via cfe-commits
https://github.com/boomanaiden154 edited https://github.com/llvm/llvm-project/pull/111625 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Insert `// NOLINTNEXTLINE(...)` for clang-tidy diagnostics (PR #111640)

2024-10-08 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-tools-extra] Insert `// NOLINTNEXTLINE(...)` for clang-tidy diagnostics (PR #111640)

2024-10-08 Thread Richard Li via cfe-commits
https://github.com/chomosuke created https://github.com/llvm/llvm-project/pull/111640 In some other language servers, there will be code actions that inserts warning suppression comment for the user. This PR implements that for clangd for clang-tidy diagnostics.. >From 0c18e956b9ef4c44bb2f896

[clang] [SPIR-V] strengthen some lit tests (PR #111636)

2024-10-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Sameer Sahasrabuddhe (ssahasra) Changes These tests were failing spuriously with unrelated changes under development. --- Full diff: https://github.com/llvm/llvm-project/pull/111636.diff 3 Files Affected: - (modified) clang/test/CodeGen

[clang] [SPIR-V] strengthen some lit tests (PR #111636)

2024-10-08 Thread Sameer Sahasrabuddhe via cfe-commits
https://github.com/ssahasra created https://github.com/llvm/llvm-project/pull/111636 These tests were failing spuriously with unrelated changes under development. >From 107a8819e02c9a5eaf7db5a520543666ea3c3a91 Mon Sep 17 00:00:00 2001 From: Sameer Sahasrabuddhe Date: Wed, 9 Oct 2024 11:30:37 +

[clang] [llvm] [clang-format] Add CI check confirming ClangFormatStyleOptions.rst is up-to-date. (PR #111513)

2024-10-08 Thread Aiden Grossman via cfe-commits
boomanaiden154 wrote: > That's an excellent question, maybe @owenca will know! I should have asked in > https://github.com/llvm/llvm-project/pull/96804#discussion_r1718407404; what > I did instead was try to reason out an explanation based on what I could see, > and I came up with two theories

[clang] [analyzer] Modernize FuchsiaHandleChecker (PR #111588)

2024-10-08 Thread Pavel Skripkin via cfe-commits
pskrgag wrote: CI again looks unrelated ```   | Failed Tests (1):   | LLVM :: Transforms/InstCombine/and-or-icmps.ll ``` https://github.com/llvm/llvm-project/pull/111588 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] [clang][python] Add CLANG_DISABLE_RUN_PYTHON_TESTS CMake option to disable clang python bindings tests (PR #111367)

2024-10-08 Thread Alex Bradbury via cfe-commits
asb wrote: > > We already have hard-coded logic to disable adding these tests to the > > `check-all` target in various cases. > > Why do you have to do that? I've never worked with the clang python bindings before, but you can basically see the reasoning in https://github.com/llvm/llvm-proje

[clang] [Clang] Add explicit visibility symbol macros (PR #108276)

2024-10-08 Thread Thomas Fransham via cfe-commits
https://github.com/fsfod updated https://github.com/llvm/llvm-project/pull/108276 >From fff6064a63ddf85857ea5036333866317a156ffc Mon Sep 17 00:00:00 2001 From: Thomas Fransham Date: Tue, 10 Sep 2024 02:22:18 +0100 Subject: [PATCH 1/7] [Clang] Add explicit visibility symbol macros and update CM

[clang] Switch DirectX Target to use the Itanium ABI (PR #111632)

2024-10-08 Thread Greg Roth via cfe-commits
https://github.com/pow2clk edited https://github.com/llvm/llvm-project/pull/111632 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Switch DirectX Target to use the Itanium ABI (PR #111632)

2024-10-08 Thread Greg Roth via cfe-commits
https://github.com/pow2clk edited https://github.com/llvm/llvm-project/pull/111632 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Switch DirectX Target to use the Itanium ABI (PR #111632)

2024-10-08 Thread Greg Roth via cfe-commits
@@ -13,16 +13,16 @@ void InitBuf(RWBuffer buf) { } // CHECK-NOT: _Init_thread_epoch -// CHECK: define internal void @"?main@@YAXXZ" +// CHECK: define internal void @_Z4mainv // CHECK-NEXT: entry: // CHECK-NEXT: [[Tmp1:%.*]] = alloca %"class.hlsl::RWBuffer" -// CHECK-NEXT: [[

[clang] Switch DirectX Target to use the Itanium ABI (PR #111632)

2024-10-08 Thread Greg Roth via cfe-commits
https://github.com/pow2clk edited https://github.com/llvm/llvm-project/pull/111632 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Switch DirectX Target to use the Itanium ABI (PR #111632)

2024-10-08 Thread Greg Roth via cfe-commits
@@ -289,17 +289,19 @@ void setFour(inout int I) { // CHECK: [[B:%.*]] = alloca %struct.B // CHECK: [[Tmp:%.*]] = alloca i32 -// CHECK: [[BFLoad:%.*]] = load i32, ptr [[B]] -// CHECK: [[BFshl:%.*]] = shl i32 [[BFLoad]], 24 -// CHECK: [[BFashr:%.*]] = ashr i32 [[BFshl]], 24 -//

[clang] Switch DirectX Target to use the Itanium ABI (PR #111632)

2024-10-08 Thread Greg Roth via cfe-commits
@@ -1,7 +1,7 @@ -// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -std=hlsl202x -emit-llvm -disable-llvm-passes %s -o - | FileCheck %s --check-prefixes=CS,NOINLINE,CHECK -// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -std=hlsl202x -emit-llvm -disable-llvm-p

[clang] Switch DirectX Target to use the Itanium ABI (PR #111632)

2024-10-08 Thread Greg Roth via cfe-commits
@@ -56,14 +55,12 @@ void main() { // CHECK-LABEL: define {{.*}}DoSilly // CHECK-NEXT:entry: -// CHECK-NEXT: [[ResPtr:%.*]] = alloca ptr // CHECK-NEXT: [[ThisPtrAddr:%.*]] = alloca ptr -// CHECK-NEXT: store ptr [[AggRes:%.*]], ptr [[ResPtr]] // CHECK-NEXT: store ptr {{.*}

[clang] Switch DirectX Target to use the Itanium ABI (PR #111632)

2024-10-08 Thread Greg Roth via cfe-commits
@@ -1,93 +1,96 @@ -// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \ -// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \ -// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \ -// RUN: --check-prefixes=CHECK,NATIVE_HALF -// RUN:

[clang] Switch DirectX Target to use the Itanium ABI (PR #111632)

2024-10-08 Thread Greg Roth via cfe-commits
https://github.com/pow2clk commented: Just a few comments to explain the changes that aren't just mangling style changes. https://github.com/llvm/llvm-project/pull/111632 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] Switch DirectX Target to use the Itanium ABI (PR #111632)

2024-10-08 Thread Greg Roth via cfe-commits
@@ -1,35 +1,66 @@ -// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple \ -// RUN: dxil-pc-shadermodel6.3-library %s \ +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.3-library %s \ // RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s

[clang] Switch DirectX Target to use the Itanium ABI (PR #111632)

2024-10-08 Thread Greg Roth via cfe-commits
@@ -1,93 +1,96 @@ -// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -x hlsl -triple \ -// RUN: dxil-pc-shadermodel6.3-library %s -fnative-half-type \ -// RUN: -emit-llvm -disable-llvm-passes -o - | FileCheck %s \ -// RUN: --check-prefixes=CHECK,NATIVE_HALF -// RUN:

[clang] Switch DirectX Target to use the Itanium ABI (PR #111632)

2024-10-08 Thread Greg Roth via cfe-commits
@@ -260,10 +260,10 @@ void order_matters(inout int X, inout int Y) { // CHECK: store i32 [[VVal]], ptr [[Tmp0]] // CHECK: [[VVal:%.*]] = load i32, ptr [[V]] // CHECK: store i32 [[VVal]], ptr [[Tmp1]] -// CHECK: call void {{.*}}order_matters{{.*}}(ptr noalias noundef nonnull al

[clang] Switch DirectX Target to use the Itanium ABI (PR #111632)

2024-10-08 Thread Greg Roth via cfe-commits
https://github.com/pow2clk edited https://github.com/llvm/llvm-project/pull/111632 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Switch DirectX Target to use the Itanium ABI (PR #111632)

2024-10-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-clang Author: Greg Roth (pow2clk) Changes To consolidate behavior of function mangling and limit the number of places that ABI changes will need to be made, this switches the DirectX target used for HLSL to use the It

[clang] 4336f00 - [clang] Track function template instantiation from definition (#110387)

2024-10-08 Thread via cfe-commits
Author: Matheus Izvekov Date: 2024-10-09T01:55:21-03:00 New Revision: 4336f00f2156970cc0af2816331387a0a4039317 URL: https://github.com/llvm/llvm-project/commit/4336f00f2156970cc0af2816331387a0a4039317 DIFF: https://github.com/llvm/llvm-project/commit/4336f00f2156970cc0af2816331387a0a4039317.dif

[clang] [clang] Track function template instantiation from definition (PR #110387)

2024-10-08 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov closed https://github.com/llvm/llvm-project/pull/110387 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] clang/AMDGPU: Stop emitting amdgpu-unsafe-fp-atomics attribute (PR #111579)

2024-10-08 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm closed https://github.com/llvm/llvm-project/pull/111579 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] d50302f - clang/AMDGPU: Stop emitting amdgpu-unsafe-fp-atomics attribute (#111579)

2024-10-08 Thread via cfe-commits
Author: Matt Arsenault Date: 2024-10-09T08:52:32+04:00 New Revision: d50302f31cee86d3270a34f5739c63a41f60f2c1 URL: https://github.com/llvm/llvm-project/commit/d50302f31cee86d3270a34f5739c63a41f60f2c1 DIFF: https://github.com/llvm/llvm-project/commit/d50302f31cee86d3270a34f5739c63a41f60f2c1.diff

[clang] [HLSL] Make HLSLAttributedResourceType canonical and add code paths to convert HLSL types to DirectX target types (PR #110327)

2024-10-08 Thread Helena Kotas via cfe-commits
@@ -32,6 +32,7 @@ #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringExtras.h" #include "llvm/Support/CRC.h" +#include "llvm/Support/DXILABI.h" hekota wrote: Nope :) https://github.com/llvm/llvm-project/pull/110327

[clang] [HLSL] Make HLSLAttributedResourceType canonical and add code paths to convert HLSL types to DirectX target types (PR #110327)

2024-10-08 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/110327 >From 4f235c0e9c539cdaa2bab9a7f8228f33c0fea2b8 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Thu, 26 Sep 2024 14:34:16 -0700 Subject: [PATCH 1/7] Add codegen for existing resource types and make HLSLAttribut

[clang] [clang-format] Insert a space between l_paren and ref-qualifier (PR #111465)

2024-10-08 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-aarch64-linux-fuzzer` running on `sanitizer-buildbot11` while building `clang` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/159/builds/7782 Here is the relevant pie

[clang] [-Wunsafe-buffer-usage] Add user documentation. (PR #111624)

2024-10-08 Thread Artem Dergachev via cfe-commits
https://github.com/haoNoQ updated https://github.com/llvm/llvm-project/pull/111624 >From b5c9082e36efcc7be2cabc73c985749f2fd41725 Mon Sep 17 00:00:00 2001 From: Artem Dergachev Date: Tue, 8 Oct 2024 20:24:00 -0700 Subject: [PATCH 1/2] [-Wunsafe-buffer-usage] Add user documentation. --- clang/

[clang] [clang][RISCV] Correct the SEW operand of indexed/fault only first segment intrinsics (PR #111476)

2024-10-08 Thread Brandon Wu via cfe-commits
4vtomat wrote: > Make sense to me. It was wrong since when? It's from the tuple interface change patches, https://github.com/llvm/llvm-project/pull/97992. https://github.com/llvm/llvm-project/pull/111476 ___ cfe-commits mailing list cfe-commits@lists

[clang] [clang-format] convert path to Windows path if user is using a MSYS2 shell (PR #111526)

2024-10-08 Thread Gary Wang via cfe-commits
BLumia wrote: > I personally use Cygwin and it's git understands unix paths is that not the > case for msys2 Git can understand (and will return a) unix path, but it seems MSYS2's python won't accept unix path. It fails at `os.chdir(toplevel)`, and `toplevel` is a unix path. > are you mixing

[clang] [clang-format] Insert a space between l_paren and ref-qualifier (PR #111465)

2024-10-08 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/111465 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 1809d0f - [clang-format] Insert a space between l_paren and ref-qualifier (#111465)

2024-10-08 Thread via cfe-commits
Author: Owen Pan Date: 2024-10-08T21:24:17-07:00 New Revision: 1809d0fa1c15b16ca94381d8be3ef70c4a83c36b URL: https://github.com/llvm/llvm-project/commit/1809d0fa1c15b16ca94381d8be3ef70c4a83c36b DIFF: https://github.com/llvm/llvm-project/commit/1809d0fa1c15b16ca94381d8be3ef70c4a83c36b.diff LOG:

[clang] [libcxx] [clang][driver] Cleanup UEFI toolchain driver (PR #111473)

2024-10-08 Thread via cfe-commits
https://github.com/Prabhuk updated https://github.com/llvm/llvm-project/pull/111473 >From 9b55509827b25fda48bdb8e2322259415c01e206 Mon Sep 17 00:00:00 2001 From: prabhukr Date: Mon, 7 Oct 2024 20:14:58 -0700 Subject: [PATCH] [clang][driver] Cleanup UEFI toolchain driver UEFI toolchain predefin

[clang-tools-extra] [clang-tidy] Avoid repeated hash lookups (NFC) (PR #111628)

2024-10-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Kazu Hirata (kazutakahirata) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/111628.diff 1 Files Affected: - (modified) clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp (+1-3) ```

[clang-tools-extra] [clang-tidy] Avoid repeated hash lookups (NFC) (PR #111628)

2024-10-08 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/111628 None >From 04ac47ef9952eaeb4e9d8ef7f7b96cb050865a3a Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Tue, 8 Oct 2024 20:42:13 -0700 Subject: [PATCH] [clang-tidy] Avoid repeated hash lookups (NFC) --- .

[clang] [llvm] [CGData][ThinLTO] Global Outlining with Two-CodeGen Rounds (PR #90933)

2024-10-08 Thread Teresa Johnson via cfe-commits
@@ -1513,6 +1522,171 @@ class InProcessThinBackend : public ThinBackendProc { return Error::success(); } }; + +/// This backend is utilized in the first round of a two-codegen round process. +/// It first saves optimized bitcode files to disk before the codegen process +/

[clang] [llvm] [CGData][ThinLTO] Global Outlining with Two-CodeGen Rounds (PR #90933)

2024-10-08 Thread Teresa Johnson via cfe-commits
@@ -0,0 +1,94 @@ +; This test verifies whether we can outline a singleton instance (i.e., an instance that does not repeat) teresajohnson wrote: This test seems like mostly an overlap of the caching test, with the exception of the regular LTO module interaction

[clang] [llvm] [CGData][ThinLTO] Global Outlining with Two-CodeGen Rounds (PR #90933)

2024-10-08 Thread Teresa Johnson via cfe-commits
@@ -1513,6 +1522,171 @@ class InProcessThinBackend : public ThinBackendProc { return Error::success(); } }; + +/// This backend is utilized in the first round of a two-codegen round process. +/// It first saves optimized bitcode files to disk before the codegen process +/

[clang] [llvm] [CGData][ThinLTO] Global Outlining with Two-CodeGen Rounds (PR #90933)

2024-10-08 Thread Teresa Johnson via cfe-commits
@@ -74,6 +75,8 @@ static cl::opt ThinLTOAssumeMerged( cl::desc("Assume the input has already undergone ThinLTO function " "importing and the other pre-optimization pipeline changes.")); +extern cl::opt CodeGenDataThinLTOTwoRounds; teresajohnso

[clang] [Clang][perf-training] Do build of libLLVMSupport for perf training (PR #111625)

2024-10-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Tom Stellard (tstellar) Changes This adds a build of the libLLVMSupport to the lit suite that is used for generating profile data. This helps to improve both PGO and BOLT optimization of clang over the existing hello world training progr

[clang] [Clang][perf-training] Do build of libLLVMSupport for perf training (PR #111625)

2024-10-08 Thread Tom Stellard via cfe-commits
https://github.com/tstellar created https://github.com/llvm/llvm-project/pull/111625 This adds a build of the libLLVMSupport to the lit suite that is used for generating profile data. This helps to improve both PGO and BOLT optimization of clang over the existing hello world training program.

[clang] [-Wunsafe-buffer-usage] Add user documentation. (PR #111624)

2024-10-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Artem Dergachev (haoNoQ) Changes This is an attempt to finally land the documentation that I initially wrote in https://reviews.llvm.org/D136811 - which doubled as RFC - and I sincerely apologize for not doing this sooner. I've rewritten

[clang] [-Wunsafe-buffer-usage] Add user documentation. (PR #111624)

2024-10-08 Thread Artem Dergachev via cfe-commits
https://github.com/haoNoQ created https://github.com/llvm/llvm-project/pull/111624 This is an attempt to finally land the documentation that I initially wrote in https://reviews.llvm.org/D136811 - which doubled as RFC - and I sincerely apologize for not doing this sooner. I've rewritten most

[clang] [HLSL] Make HLSLAttributedResourceType canonical and add code paths to convert HLSL types to DirectX target types (PR #110327)

2024-10-08 Thread Helena Kotas via cfe-commits
@@ -13672,6 +13690,9 @@ static QualType getCommonNonSugarTypeNode(ASTContext &Ctx, const Type *X, TX->getDepth(), TX->getIndex(), TX->isParameterPack(), getCommonDecl(TX->getDecl(), TY->getDecl())); } + case Type::HLSLAttributedResource: { h

[clang] [clang] WIP: Warn on mismatched RequiresCapability attributes (PR #67520)

2024-10-08 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/67520 >From 55efd18bb177150a1fd170cb1535e225854967a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Thu, 20 Jun 2024 07:39:20 +0200 Subject: [PATCH] Warn on RequiresCapability attribute mismatch -

[clang] [clang] WIP: Warn on mismatched RequiresCapability attributes (PR #67520)

2024-10-08 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -2249,7 +2249,7 @@ void fooF1(Foo *f) EXCLUSIVE_LOCKS_REQUIRED(f->mu_) { f

[clang] [HLSL] Make HLSLAttributedResourceType canonical and add code paths to convert HLSL types to DirectX target types (PR #110327)

2024-10-08 Thread Helena Kotas via cfe-commits
@@ -3437,6 +3437,9 @@ static void encodeTypeForFunctionPointerAuth(const ASTContext &Ctx, OS << II->getLength() << II->getName(); return; } + case Type::HLSLAttributedResource: hekota wrote: The other "should never get here"' is in a different swit

[clang] [lld] [lld][LoongArch] Enable relaxation when --relax option is passed (PR #111488)

2024-10-08 Thread Fangrui Song via cfe-commits
@@ -134,6 +134,13 @@ void loongarch::getLoongArchTargetFeatures(const Driver &D, (!Args.hasArgNoClaim(clang::driver::options::OPT_march_EQ))) Features.push_back("+lsx"); + // -mrelax is default, unless -mno-relax is specified. MaskRay wrote: This

[clang] [lld] [lld][LoongArch] Enable relaxation when --relax option is passed (PR #111488)

2024-10-08 Thread Fangrui Song via cfe-commits
@@ -1462,6 +1462,8 @@ template void Writer::finalizeAddressDependentContent() { for (;;) { bool changed = ctx.target->needsThunks ? tc.createThunks(pass, ctx.outputSections) + : ctx.arg.emachine == EM_LOONGARCH && !ctx.arg.relax

[clang] [lld] [lld][LoongArch] Enable relaxation when --relax option is passed (PR #111488)

2024-10-08 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay commented: We split clang and lld changes. https://github.com/llvm/llvm-project/pull/111488 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [lld] [lld][LoongArch] Enable relaxation when --relax option is passed (PR #111488)

2024-10-08 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/111488 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] WIP: Warn on mismatched RequiresCapability attributes (PR #67520)

2024-10-08 Thread Timm Baeder via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= Message-ID: In-Reply-To: @@ -2282,6 +2308,9 @@ void ThreadSafetyAnalyzer::runAnalysis(AnalysisDeclContex

[clang] [clang][RISCV] Correct the SEW operand of indexed/fault only first segment intrinsics (PR #111476)

2024-10-08 Thread Pengcheng Wang via cfe-commits
https://github.com/wangpc-pp approved this pull request. Make sense to me. It was wrong since when? https://github.com/llvm/llvm-project/pull/111476 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] [Sema] Support negation/parens with __builtin_available (PR #111439)

2024-10-08 Thread Helena Kotas via cfe-commits
https://github.com/hekota approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/111439 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Harden incomingCalls() against possible misinterpretation of a range as pertaining to the wrong file (PR #111616)

2024-10-08 Thread Nathan Ridge via cfe-commits
@@ -2292,9 +2289,26 @@ incomingCalls(const CallHierarchyItem &Item, const SymbolIndex *Index) { Index->lookup(ContainerLookup, [&](const Symbol &Caller) { auto It = CallsIn.find(Caller.ID); assert(It != CallsIn.end()); -if (auto CHI = symbolToCallHierarchyItem(Ca

[clang-tools-extra] [clangd] Harden incomingCalls() against possible misinterpretation of a range as pertaining to the wrong file (PR #111616)

2024-10-08 Thread Nathan Ridge via cfe-commits
@@ -2292,9 +2289,26 @@ incomingCalls(const CallHierarchyItem &Item, const SymbolIndex *Index) { Index->lookup(ContainerLookup, [&](const Symbol &Caller) { auto It = CallsIn.find(Caller.ID); assert(It != CallsIn.end()); -if (auto CHI = symbolToCallHierarchyItem(Ca

[clang-tools-extra] [clangd] Harden incomingCalls() against possible misinterpretation of a range as pertaining to the wrong file (PR #111616)

2024-10-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangd Author: Nathan Ridge (HighCommander4) Changes I don't have a concrete motivating scenario here, just something I noticed during code reading: `CallHierarchyIncomingCall::fromRanges` are interpreted as ranges in the same file as the `CallHierarc

[clang-tools-extra] [clangd] Harden incomingCalls() against possible misinterpretation of a range as pertaining to the wrong file (PR #111616)

2024-10-08 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Nathan Ridge (HighCommander4) Changes I don't have a concrete motivating scenario here, just something I noticed during code reading: `CallHierarchyIncomingCall::fromRanges` are interpreted as ranges in the same file as the `

[clang-tools-extra] [clangd] Harden incomingCalls() against possible misinterpretation of a range as pertaining to the wrong file (PR #111616)

2024-10-08 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 created https://github.com/llvm/llvm-project/pull/111616 I don't have a concrete motivating scenario here, just something I noticed during code reading: `CallHierarchyIncomingCall::fromRanges` are interpreted as ranges in the same file as the `CallHierarchyIt

[clang] [clang] Track function template instantiation from definition (PR #110387)

2024-10-08 Thread Younan Zhang via cfe-commits
@@ -1008,6 +1008,15 @@ class FunctionTemplateDecl : public RedeclarableTemplateDecl { return getTemplatedDecl()->isThisDeclarationADefinition(); } + bool isCompatibleWithDefinition() const { +return getTemplatedDecl()->isInstantiatedFromMemberTemplate() || +

[clang] [clang] Track function template instantiation from definition (PR #110387)

2024-10-08 Thread Matheus Izvekov via cfe-commits
@@ -1008,6 +1008,15 @@ class FunctionTemplateDecl : public RedeclarableTemplateDecl { return getTemplatedDecl()->isThisDeclarationADefinition(); } + bool isCompatibleWithDefinition() const { +return getTemplatedDecl()->isInstantiatedFromMemberTemplate() || +

[clang] [clang] Track function template instantiation from definition (PR #110387)

2024-10-08 Thread Younan Zhang via cfe-commits
@@ -1008,6 +1008,15 @@ class FunctionTemplateDecl : public RedeclarableTemplateDecl { return getTemplatedDecl()->isThisDeclarationADefinition(); } + bool isCompatibleWithDefinition() const { +return getTemplatedDecl()->isInstantiatedFromMemberTemplate() || +

[clang-tools-extra] [clang-include-cleaner] Fix incorrect directory issue for writing files (PR #111375)

2024-10-08 Thread Byoungchan Lee via cfe-commits
bc-lee wrote: Could you provide a minimal reproducer for this case if possible? Ideally, it should not depend on Google's internal Bazel setup or tools. From what I understand, Bazel itself doesn’t generate compilation databases, and third-party tools adjust the paths of raw compiler invocatio

[clang-tools-extra] [clangd] [Modules] Support Reusable Modules Builder (PR #106683)

2024-10-08 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: @kadircet ping~ It will be pretty good for the users if we can have this for clang20. https://github.com/llvm/llvm-project/pull/106683 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[clang] [RFC][C++20][Modules] Relax ODR check in unnamed modules (PR #111160)

2024-10-08 Thread Chuanqi Xu via cfe-commits
@@ -2527,7 +2527,7 @@ class BitsUnpacker { inline bool shouldSkipCheckingODR(const Decl *D) { return D->getASTContext().getLangOpts().SkipODRCheckInGMF && - D->isFromGlobalModule(); + (D->isFromGlobalModule() || !D->isInNamedModule()); Chuanq

[clang] [RFC][C++20][Modules] Relax ODR check in unnamed modules (PR #111160)

2024-10-08 Thread Chuanqi Xu via cfe-commits
@@ -2527,7 +2527,7 @@ class BitsUnpacker { inline bool shouldSkipCheckingODR(const Decl *D) { return D->getASTContext().getLangOpts().SkipODRCheckInGMF && - D->isFromGlobalModule(); + (D->isFromGlobalModule() || !D->isInNamedModule()); Chuanq

[clang] [libcxx] [clang] remove extra space in warn_atomic_op_oversized (NFC) (PR #110955)

2024-10-08 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `sanitizer-aarch64-linux-fuzzer` running on `sanitizer-buildbot11` while building `clang,libcxx` at step 2 "annotate". Full details are available at: https://lab.llvm.org/buildbot/#/builders/159/builds/7776 Here is the relev

[clang] [libcxx] [clang] remove extra space in warn_atomic_op_oversized (NFC) (PR #110955)

2024-10-08 Thread via cfe-commits
https://github.com/Enna1 closed https://github.com/llvm/llvm-project/pull/110955 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] ff6faca - [clang] remove extra space in warn_atomic_op_oversized (NFC) (#110955)

2024-10-08 Thread via cfe-commits
Author: Enna1 Date: 2024-10-09T09:16:55+08:00 New Revision: ff6facaa61d9bd58ec375be80fc725b2bb6fbadf URL: https://github.com/llvm/llvm-project/commit/ff6facaa61d9bd58ec375be80fc725b2bb6fbadf DIFF: https://github.com/llvm/llvm-project/commit/ff6facaa61d9bd58ec375be80fc725b2bb6fbadf.diff LOG: [c

[clang] [llvm] [HLSL] Implement `WaveReadLaneAt` intrinsic (PR #111010)

2024-10-08 Thread Farzon Lotfi via cfe-commits
@@ -87,6 +87,7 @@ class CGHLSLRuntime { GENERATE_HLSL_INTRINSIC_FUNCTION(SDot, sdot) GENERATE_HLSL_INTRINSIC_FUNCTION(UDot, udot) GENERATE_HLSL_INTRINSIC_FUNCTION(WaveIsFirstLane, wave_is_first_lane) + GENERATE_HLSL_INTRINSIC_FUNCTION(WaveReadLaneAt, waveReadLaneAt)

[clang] [clang-tools-extra] RFC: [clang-tidy] [analyzer] Move nondeterministic pointer usage check to tidy (PR #110471)

2024-10-08 Thread via cfe-commits
vabridgers wrote: @5chmidti , thanks for the comments. I'll start to work through those. https://github.com/llvm/llvm-project/pull/110471 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[clang] [Clang][Sema] Fix exception specification comparison for functions with different template depths (PR #111561)

2024-10-08 Thread Matheus Izvekov via cfe-commits
@@ -501,6 +519,89 @@ bool Sema::CheckEquivalentExceptionSpec( return Result; } +static const Expr *SubstituteExceptionSpecWithoutEvaluation( +Sema &S, const Sema::TemplateCompareNewDeclInfo &DeclInfo, +const Expr *ExceptionSpec) { + MultiLevelTemplateArgumentList ML

[clang] [llvm] [HLSL] Implement `WaveReadLaneAt` intrinsic (PR #111010)

2024-10-08 Thread Chris B via cfe-commits
@@ -87,6 +87,7 @@ class CGHLSLRuntime { GENERATE_HLSL_INTRINSIC_FUNCTION(SDot, sdot) GENERATE_HLSL_INTRINSIC_FUNCTION(UDot, udot) GENERATE_HLSL_INTRINSIC_FUNCTION(WaveIsFirstLane, wave_is_first_lane) + GENERATE_HLSL_INTRINSIC_FUNCTION(WaveReadLaneAt, waveReadLaneAt)

[clang] [llvm] [HLSL] Implement `WaveReadLaneAt` intrinsic (PR #111010)

2024-10-08 Thread Chris B via cfe-commits
@@ -87,6 +87,7 @@ class CGHLSLRuntime { GENERATE_HLSL_INTRINSIC_FUNCTION(SDot, sdot) GENERATE_HLSL_INTRINSIC_FUNCTION(UDot, udot) GENERATE_HLSL_INTRINSIC_FUNCTION(WaveIsFirstLane, wave_is_first_lane) + GENERATE_HLSL_INTRINSIC_FUNCTION(WaveReadLaneAt, waveReadLaneAt)

[clang] [llvm] [HLSL] Implement `WaveReadLaneAt` intrinsic (PR #111010)

2024-10-08 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/111010 >From 70089645ec5cf62b491a56df96ec46f4328fbc11 Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Thu, 3 Oct 2024 11:43:51 -0700 Subject: [PATCH 01/10] [HLSL] Implement `WaveReadLaneAt` intrinsic - create a

[clang] [llvm] [InstrPGO] Instrument sampling profile based cold function (PR #109837)

2024-10-08 Thread Lei Wang via cfe-commits
https://github.com/wlei-llvm updated https://github.com/llvm/llvm-project/pull/109837 >From 07a2cab3fa5df2965f9f7da9ee2d3603581a47f1 Mon Sep 17 00:00:00 2001 From: wlei Date: Sun, 22 Sep 2024 20:23:20 -0700 Subject: [PATCH 1/5] [InstrPGO] Instrument sampling profile based cold function --- c

[clang] [llvm] [InstrPGO] Instrument sampling profile based cold function (PR #109837)

2024-10-08 Thread Lei Wang via cfe-commits
@@ -1119,6 +1125,18 @@ PassBuilder::buildModuleSimplificationPipeline(OptimizationLevel Level, // removed. MPM.addPass( PGOIndirectCallPromotion(true /* IsInLTO */, true /* SamplePGO */)); + +if (InstrumentSampleColdFuncPath.getNumOccurrences() && +

[clang] [llvm] [HLSL] Implement `WaveReadLaneAt` intrinsic (PR #111010)

2024-10-08 Thread Finn Plummer via cfe-commits
@@ -0,0 +1,26 @@ +// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify -verify-ignore-unexpected inbelic wrote: Good catch. There are no ignored diagnostics and it

[clang] [llvm] [HLSL] Implement `WaveReadLaneAt` intrinsic (PR #111010)

2024-10-08 Thread Finn Plummer via cfe-commits
@@ -87,6 +87,7 @@ class CGHLSLRuntime { GENERATE_HLSL_INTRINSIC_FUNCTION(SDot, sdot) GENERATE_HLSL_INTRINSIC_FUNCTION(UDot, udot) GENERATE_HLSL_INTRINSIC_FUNCTION(WaveIsFirstLane, wave_is_first_lane) + GENERATE_HLSL_INTRINSIC_FUNCTION(WaveReadLaneAt, waveReadLaneAt)

[clang] [Clang][Sema] Fix exception specification comparison for functions with different template depths (PR #111561)

2024-10-08 Thread Younan Zhang via cfe-commits
@@ -501,6 +519,89 @@ bool Sema::CheckEquivalentExceptionSpec( return Result; } +static const Expr *SubstituteExceptionSpecWithoutEvaluation( +Sema &S, const Sema::TemplateCompareNewDeclInfo &DeclInfo, +const Expr *ExceptionSpec) { + MultiLevelTemplateArgumentList ML

[clang] [Clang][Sema] Fix exception specification comparison for functions with different template depths (PR #111561)

2024-10-08 Thread Younan Zhang via cfe-commits
@@ -501,6 +519,89 @@ bool Sema::CheckEquivalentExceptionSpec( return Result; } +static const Expr *SubstituteExceptionSpecWithoutEvaluation( +Sema &S, const Sema::TemplateCompareNewDeclInfo &DeclInfo, +const Expr *ExceptionSpec) { + MultiLevelTemplateArgumentList ML

[clang] [Clang] fix overload resolution for object parameters with top-level cv-qualifiers in member functions (PR #110435)

2024-10-08 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/110435 >From c52634882631a71fad956a70179b480abf13006a Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sun, 29 Sep 2024 22:01:38 +0300 Subject: [PATCH 1/3] [Clang] fix overload resolution for object parameters with

[clang] [llvm] [HLSL] Implement `WaveReadLaneAt` intrinsic (PR #111010)

2024-10-08 Thread Chris B via cfe-commits
@@ -18835,6 +18835,24 @@ case Builtin::BI__builtin_hlsl_elementwise_isinf: { Intrinsic::ID ID = CGM.getHLSLRuntime().getWaveIsFirstLaneIntrinsic(); return EmitRuntimeCall(Intrinsic::getDeclaration(&CGM.getModule(), ID)); } + case Builtin::BI__builtin_hlsl_wave_read_l

[clang] [llvm] [HLSL] Implement `WaveReadLaneAt` intrinsic (PR #111010)

2024-10-08 Thread Chris B via cfe-commits
@@ -87,6 +87,7 @@ class CGHLSLRuntime { GENERATE_HLSL_INTRINSIC_FUNCTION(SDot, sdot) GENERATE_HLSL_INTRINSIC_FUNCTION(UDot, udot) GENERATE_HLSL_INTRINSIC_FUNCTION(WaveIsFirstLane, wave_is_first_lane) + GENERATE_HLSL_INTRINSIC_FUNCTION(WaveReadLaneAt, waveReadLaneAt)

  1   2   3   4   5   >