[clang] [llvm] [LTO] Reduce memory usage for import lists (PR #106772)

2024-08-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-llvm-transforms @llvm/pr-subscribers-clang-codegen Author: Kazu Hirata (kazutakahirata) Changes This patch reduces the memory usage for import lists by employing memory-efficient data structures. With this patch, an import lis

[clang] [llvm] [HLSL] AST support for WaveSize attribute. (PR #101240)

2024-08-30 Thread Justin Bogner via cfe-commits
@@ -153,6 +154,25 @@ HLSLNumThreadsAttr *SemaHLSL::mergeNumThreadsAttr(Decl *D, HLSLNumThreadsAttr(getASTContext(), AL, X, Y, Z); } +HLSLWaveSizeAttr *SemaHLSL::mergeWaveSizeAttr(Decl *D, + const AttributeCommonInfo &AL, +

[clang] [llvm] [HLSL] AST support for WaveSize attribute. (PR #101240)

2024-08-30 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/101240 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL][Doc] Document multi-argument resolution (PR #104474)

2024-08-30 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/104474 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement output parameter (PR #101083)

2024-08-30 Thread Chris B via cfe-commits
llvm-beanz wrote: ping @rjmccall. I think I've updated to address all your feedback. Let me know if there's anything else you think I should change. https://github.com/llvm/llvm-project/pull/101083 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[clang] [llvm] [HLSL] AST support for WaveSize attribute. (PR #101240)

2024-08-30 Thread Xiang Li via cfe-commits
https://github.com/python3kgae updated https://github.com/llvm/llvm-project/pull/101240 >From 65b4ab94bc533c8dee9733761947671a4d326e90 Mon Sep 17 00:00:00 2001 From: Xiang Li Date: Tue, 30 Jul 2024 16:34:40 -0400 Subject: [PATCH 1/6] [HLSL] AST support for WaveSize attribute. First step for su

[clang] Thread Safety Analysis: Differentiate between lock sets at real join points and expected/actual sets at function end (PR #105526)

2024-08-30 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert approved this pull request. It could be argued that the issue here is something different, namely that we don't add the scoped lock in the return slot to the expected function exit set. But this is likely not enough: * We don't compare the set of underlying mutex

[clang] [llvm] [HLSL] AST support for WaveSize attribute. (PR #101240)

2024-08-30 Thread Xiang Li via cfe-commits
https://github.com/python3kgae updated https://github.com/llvm/llvm-project/pull/101240 >From 65b4ab94bc533c8dee9733761947671a4d326e90 Mon Sep 17 00:00:00 2001 From: Xiang Li Date: Tue, 30 Jul 2024 16:34:40 -0400 Subject: [PATCH 1/7] [HLSL] AST support for WaveSize attribute. First step for su

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-08-30 Thread via cfe-commits
https://github.com/higher-performance updated https://github.com/llvm/llvm-project/pull/102040 >From 1695451175d65cdda8647e273d8b8643629aea54 Mon Sep 17 00:00:00 2001 From: higher-performance Date: Mon, 5 Aug 2024 15:04:19 -0400 Subject: [PATCH] Add Clang attribute to ensure that fields are ini

[clang] [compiler-rt] [llvm] [CMake][compiler-rt] Support for using compiler-rt atomic library (PR #106603)

2024-08-30 Thread Petr Hosek via cfe-commits
petrhosek wrote: I'm building on Linux so I believe we use the atomic CAS spinlock. There's an option to use pthreads though: https://github.com/llvm/llvm-project/blob/130eddf7a13f15c9c48b7fa7faf60e9bbee4f703/compiler-rt/lib/builtins/CMakeLists.txt#L240-L242 I'll check if enabling the use of pth

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-08-30 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 a9ffb719bc323588b6b60fbf227db8104a81310e 1695451175d65cdda8647e273d8b8643629aea54 --e

[clang] [llvm] [HLSL] AST support for WaveSize attribute. (PR #101240)

2024-08-30 Thread Xiang Li via cfe-commits
@@ -0,0 +1,20 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.8-pixel -x hlsl %s -verify +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.8-vertex -x hlsl %s -verify +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.8-geometry -x hlsl %s -verify +// RUN: %clang_cc1 -triple d

[clang] [llvm] [HLSL] AST support for WaveSize attribute. (PR #101240)

2024-08-30 Thread Xiang Li via cfe-commits
@@ -357,6 +398,74 @@ void SemaHLSL::handleNumThreadsAttr(Decl *D, const ParsedAttr &AL) { D->addAttr(NewAttr); } +static bool isValidWaveSizeValue(unsigned Value) { + return (Value >= 4 && Value <= 128 && ((Value & (Value - 1)) == 0)); python3kgae wrote:

[clang] [llvm] [HLSL] AST support for WaveSize attribute. (PR #101240)

2024-08-30 Thread Xiang Li via cfe-commits
@@ -153,6 +154,25 @@ HLSLNumThreadsAttr *SemaHLSL::mergeNumThreadsAttr(Decl *D, HLSLNumThreadsAttr(getASTContext(), AL, X, Y, Z); } +HLSLWaveSizeAttr *SemaHLSL::mergeWaveSizeAttr(Decl *D, + const AttributeCommonInfo &AL, +

[clang] [ExtendLifetimes] Add extend lifetimes to emit fake uses from clang (PR #106724)

2024-08-30 Thread Stephen Tozer via cfe-commits
https://github.com/SLTozer edited https://github.com/llvm/llvm-project/pull/106724 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-08-30 Thread via cfe-commits
https://github.com/higher-performance updated https://github.com/llvm/llvm-project/pull/102040 >From 9833f57fe4b585fa4da55e71a84f8d206c3a9ef3 Mon Sep 17 00:00:00 2001 From: higher-performance Date: Mon, 5 Aug 2024 15:04:19 -0400 Subject: [PATCH] Add Clang attribute to ensure that fields are ini

[clang] Add Clang attribute to ensure that fields are initialized explicitly (PR #102040)

2024-08-30 Thread via cfe-commits
@@ -1419,6 +1419,28 @@ is not specified. }]; } +def ExplicitInitDocs : Documentation { + let Category = DocCatField; + let Content = [{ +The ``clang::explicit_init`` attribute indicates that the field must be +initialized explicitly by the caller when the class is construc

[clang] [compiler-rt] [llvm] [CMake][compiler-rt] Support for using compiler-rt atomic library (PR #106603)

2024-08-30 Thread Chris Apple via cfe-commits
cjappl wrote: > but it'd be better if we handled atomic CAS spinlocks as well since we would > like to avoid the pthread dependency if possible. Agreed, I have something in the works for this but it is a little ways off. (catching these unbound loops is a bit tricky) My recommendation to make

[clang-tools-extra] c49770c - [NFC] Prefer subprocess.DEVNULL over os.devnull (#106500)

2024-08-30 Thread via cfe-commits
Author: Nicolas van Kempen Date: 2024-08-30T19:26:49+01:00 New Revision: c49770c60f26e449379447109f7d915bd8de0384 URL: https://github.com/llvm/llvm-project/commit/c49770c60f26e449379447109f7d915bd8de0384 DIFF: https://github.com/llvm/llvm-project/commit/c49770c60f26e449379447109f7d915bd8de0384.

[clang] c49770c - [NFC] Prefer subprocess.DEVNULL over os.devnull (#106500)

2024-08-30 Thread via cfe-commits
Author: Nicolas van Kempen Date: 2024-08-30T19:26:49+01:00 New Revision: c49770c60f26e449379447109f7d915bd8de0384 URL: https://github.com/llvm/llvm-project/commit/c49770c60f26e449379447109f7d915bd8de0384 DIFF: https://github.com/llvm/llvm-project/commit/c49770c60f26e449379447109f7d915bd8de0384.

[clang] [clang-tools-extra] [lldb] [llvm] [NFC] Prefer subprocess.DEVNULL over os.devnull (PR #106500)

2024-08-30 Thread Alexander Richardson via cfe-commits
https://github.com/arichardson closed https://github.com/llvm/llvm-project/pull/106500 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [CodeView] Flatten cmd args in frontend for LF_BUILDINFO (PR #106369)

2024-08-30 Thread Alexandre Ganea via cfe-commits
aganea wrote: > Maded the suggested changes. Continuing looking into the failing tests. This > is my first llvm pr and I need some time to figure out the issues those are > indicating and replicating those locally. I recommend that you build a Debug target, ie. `cmake -DCMAKE_BUILD_TYPE=Debug

[clang] [llvm] [ARM] musttail fixes (PR #102896)

2024-08-30 Thread Eli Friedman via cfe-commits
@@ -0,0 +1,43 @@ +; RUN: llc -mtriple=arm-eabi %s -o - | FileCheck %s + +; The repro example from https://github.com/llvm/llvm-project/issues/57069#issuecomment-1212754850 +; Function Attrs: mustprogress nofree noinline norecurse nosync nounwind sspstrong willreturn memory(none)

[clang] [llvm] [ARM] musttail fixes (PR #102896)

2024-08-30 Thread Eli Friedman via cfe-commits
@@ -0,0 +1,43 @@ +; RUN: llc -mtriple=arm-eabi %s -o - | FileCheck %s efriedma-quic wrote: Please generate checks with update_llc_test_checks.py https://github.com/llvm/llvm-project/pull/102896 ___ cfe-commits mailing

[clang] [llvm] [SCCP] Infer return attributes in SCCP as well (PR #106732)

2024-08-30 Thread Nikita Popov via cfe-commits
nikic wrote: > Compilation time impact looks acceptable. If you want to further reduce > compile-time impact, you can remove/stop inferring unnecessary range > attributes on intrinsic calls (e.g., `call i32 range(i32 0, -2147483648) > @llvm.abs(i32 %x)`). These trivial cases are already handle

[clang] [llvm] [SCCP] Infer return attributes in SCCP as well (PR #106732)

2024-08-30 Thread Nikita Popov via cfe-commits
@@ -354,6 +354,36 @@ bool SCCPSolver::removeNonFeasibleEdges(BasicBlock *BB, DomTreeUpdater &DTU, return true; } +void SCCPSolver::inferReturnAttributes() const { + for (const auto &I : getTrackedRetVals()) { +Function *F = I.first; +const ValueLatticeElement &Retu

[clang] [llvm] [SCCP] Infer return attributes in SCCP as well (PR #106732)

2024-08-30 Thread Nikita Popov via cfe-commits
@@ -354,6 +354,36 @@ bool SCCPSolver::removeNonFeasibleEdges(BasicBlock *BB, DomTreeUpdater &DTU, return true; } +void SCCPSolver::inferReturnAttributes() const { + for (const auto &I : getTrackedRetVals()) { +Function *F = I.first; +const ValueLatticeElement &Retu

[clang] [HLSL] Allow truncation to scalar (PR #104844)

2024-08-30 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp approved this pull request. https://github.com/llvm/llvm-project/pull/104844 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Allow truncation to scalar (PR #104844)

2024-08-30 Thread Damyan Pepper via cfe-commits
@@ -673,9 +673,6 @@ float dot(float3, float3); _HLSL_BUILTIN_ALIAS(__builtin_hlsl_dot) float dot(float4, float4); -_HLSL_BUILTIN_ALIAS(__builtin_hlsl_dot) -double dot(double, double); - damyanp wrote: Surprised to see this here based on the description. Wonde

[clang] [HLSL] Allow truncation to scalar (PR #104844)

2024-08-30 Thread Damyan Pepper via cfe-commits
@@ -143,19 +143,3 @@ float test_dot_float3(float3 p0, float3 p1) { return dot(p0, p1); } // CHECK: %dx.dot = call float @llvm.dx.dot4.v4f32(<4 x float> %0, <4 x float> %1) // CHECK: ret float %dx.dot float test_dot_float4(float4 p0, float4 p1) { return dot(p0, p1); } - -// CH

[clang] [HLSL] Implement TransformHLSLAttributedResourceType (PR #106673)

2024-08-30 Thread Damyan Pepper via cfe-commits
damyanp wrote: > > Tests? > > There are no tests yet because the code that creates > HLSLAttributedResourceType is not in yet. Without the tests you're kind of asking the code reviewers to test your code in their heads Is there some other way to slice this so that there's a smaller part

[clang] fix kcfi doesn't take effect when callee function has no input parameter (PR #106677)

2024-08-30 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: If a function is declared without a prototype (pre-C23), it doesn't mean it has a void argument list; it means the argument list is undeclared. So you can't just assume the argument list is void; you have to compute the argument types from the actua

[clang] fix kcfi doesn't take effect when callee function has no input parameter (PR #106677)

2024-08-30 Thread Sami Tolvanen via cfe-commits
samitolvanen wrote: > If a function is declared without a prototype (pre-C23), it doesn't mean it > has a void argument list; it means the argument list is undeclared. So you > can't just assume the argument list is void; you have to compute the argument > types from the actual arguments passe

[clang] [flang] [flang][driver] Add pre-processing type for Fortran pre-processed files (PR #104664)

2024-08-30 Thread Andrzej Warzyński via cfe-commits
https://github.com/banach-space commented: Thanks for the updates, some minor suggestions inline. https://github.com/llvm/llvm-project/pull/104664 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[clang] [flang] [flang][driver] Add pre-processing type for Fortran pre-processed files (PR #104664)

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

[clang] [flang] [flang][driver] Add pre-processing type for Fortran pre-processed files (PR #104664)

2024-08-30 Thread Andrzej Warzyński via cfe-commits
@@ -79,7 +79,14 @@ TYPE("c++-module-cpp-output",PP_CXXModule, INVALID, "iim",phases TYPE("ada", Ada, INVALID, nullptr, phases::Compile, phases::Backend, phases::Assemble, phases::Link) TYPE("assembler",PP_A

[clang] [clang][AIX] Fix -print-runtime-dir on AIX (PR #104806)

2024-08-30 Thread David Tenty via cfe-commits
https://github.com/daltenty approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/104806 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add testing for space parameter on global constants (PR #106782)

2024-08-30 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 created https://github.com/llvm/llvm-project/pull/106782 The space parameter in the register binding annotation may not be used for global constants. There was previously no diagnostic emitted when this case occurred. This PR adds a diagnostic when this case occurs,

[clang] [HLSL] Add testing for space parameter on global constants (PR #106782)

2024-08-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Joshua Batista (bob80905) Changes The space parameter in the register binding annotation may not be used for global constants. There was previously no diagnostic emitted when this case occurred. This PR adds a diagnostic when this case oc

[clang] [llvm] Add step builtins and step HLSL function to DirectX and SPIR-V backend (PR #106471)

2024-08-30 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp approved this pull request. https://github.com/llvm/llvm-project/pull/106471 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-tidy] Suggest using reinterpret_cast in bugprone-casting-thro… (PR #106784)

2024-08-30 Thread Carlos Galvez via cfe-commits
https://github.com/carlosgalvezp created https://github.com/llvm/llvm-project/pull/106784 …ugh-void reinterpret_cast is the equivalent construct, and more clearly expresses intent. >From d3f0a650d7e3ad5bc8134e4c1fbb84ccb82d5105 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20G=C3=A1lvez?= D

[clang-tools-extra] [clang-tidy] Suggest using reinterpret_cast in bugprone-casting-thro… (PR #106784)

2024-08-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tools-extra Author: Carlos Galvez (carlosgalvezp) Changes …ugh-void reinterpret_cast is the equivalent construct, and more clearly expresses intent. --- Full diff: https://github.com/llvm/llvm-project/pull/106784.diff 4 Files Affected: - (modi

[clang] [clang] check deduction consistency when partial ordering function templates (PR #100692)

2024-08-30 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: Reduction: ``` template struct __promote { using type = float; }; template class complex {}; template complex<_Tp> pow(const complex<_Tp> &) {}; template complex::type> pow(_Tp) = delete; using F0 = complex (*)(const complex &); F0 ptr{pow}; ``` This is the same as the

[clang] [HLSL] Add testing for space parameter on global constants (PR #106782)

2024-08-30 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 edited https://github.com/llvm/llvm-project/pull/106782 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add testing for space parameter on global constants (PR #106782)

2024-08-30 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/106782 >From 99408f31a8946df7ef9efa223d0dba2ab876fcd0 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Fri, 30 Aug 2024 12:08:37 -0700 Subject: [PATCH 1/2] add diag and testing for space and global constants ---

[clang] [clang][OpenMP] Simplify handling of implicit DSA/mapping information (PR #106786)

2024-08-30 Thread Krzysztof Parzyszek via cfe-commits
https://github.com/kparzysz created https://github.com/llvm/llvm-project/pull/106786 Create `VariableImplicitInfo` to hold the data. Most of it is used all at once, so aggregating it seems like a good idea. >From 92e82b249836b4f17d1e13a927ca3e8300f671ee Mon Sep 17 00:00:00 2001 From: Krzysztof

[clang] [clang][OpenMP] Simplify handling of implicit DSA/mapping information (PR #106786)

2024-08-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Krzysztof Parzyszek (kparzysz) Changes Create `VariableImplicitInfo` to hold the data. Most of it is used all at once, so aggregating it seems like a good idea. --- Full diff: https://github.com/llvm/llvm-project/pull/106786.diff 1 File

[clang] [HLSL] Add testing for space parameter on global constants (PR #106782)

2024-08-30 Thread Damyan Pepper via cfe-commits
@@ -817,8 +821,12 @@ static void DiagnoseHLSLRegisterAttribute(Sema &S, SourceLocation &ArgLoc, S.Diag(TheDecl->getLocation(), diag::warn_hlsl_user_defined_type_missing_member) << regTypeNum; - -return; +// non-zero SpaceNum cannot be speci

[clang] [HLSL] Add testing for space parameter on global constants (PR #106782)

2024-08-30 Thread Damyan Pepper via cfe-commits
@@ -0,0 +1,25 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o - -fsyntax-only %s -verify + + +// expected-error@+1 {{invalid space specifier 's2' used; expected 'space' followed by an integer, like space1}} +cbuffer a : register(b0, s2) { + +} + +// expe

[clang] [HLSL] Add testing for space parameter on global constants (PR #106782)

2024-08-30 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp requested changes to this pull request. https://github.com/llvm/llvm-project/pull/106782 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Add testing for space parameter on global constants (PR #106782)

2024-08-30 Thread Damyan Pepper via cfe-commits
@@ -0,0 +1,25 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -o - -fsyntax-only %s -verify + + +// expected-error@+1 {{invalid space specifier 's2' used; expected 'space' followed by an integer, like space1}} +cbuffer a : register(b0, s2) { + +} + +// expe

[clang] [HLSL] Implement TransformHLSLAttributedResourceType (PR #106673)

2024-08-30 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/106673 >From f060654648707f3bf7ecf68b01db8d7c0a8b2bf6 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Thu, 29 Aug 2024 23:51:54 -0700 Subject: [PATCH 1/2] [HLSL] Implement TransformHLSLAttributedResourceType to enabl

[clang] [HLSL] Adjust resource binding diagnostic flags code (PR #106657)

2024-08-30 Thread Helena Kotas via cfe-commits
@@ -612,57 +588,61 @@ static RegisterBindingFlags HLSLFillRegisterBindingFlags(Sema &S, return Flags; } - if (!isDeclaredWithinCOrTBuffer(TheDecl)) { -// make sure the type is a basic / numeric type -if (TheVarDecl) { - QualType TheQualTy = TheVarDecl->get

[clang] [llvm] [LTO] Reduce memory usage for import lists (PR #106772)

2024-08-30 Thread Jan Voung via cfe-commits
https://github.com/jvoung approved this pull request. Nice! LG https://github.com/llvm/llvm-project/pull/106772 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LTO] Reduce memory usage for import lists (PR #106772)

2024-08-30 Thread Jan Voung via cfe-commits
https://github.com/jvoung edited https://github.com/llvm/llvm-project/pull/106772 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LTO] Reduce memory usage for import lists (PR #106772)

2024-08-30 Thread Jan Voung via cfe-commits
@@ -174,51 +174,33 @@ std::string llvm::computeLTOCacheKey( for (auto GUID : ExportsGUID) Hasher.update(ArrayRef((uint8_t *)&GUID, sizeof(GUID))); - // Include the hash for every module we import functions from. The set of - // imported symbols for each module may affe

[clang] [HLSL] Adjust resource binding diagnostic flags code (PR #106657)

2024-08-30 Thread Helena Kotas via cfe-commits
@@ -480,6 +480,9 @@ struct RegisterBindingFlags { bool ContainsNumeric = false; bool DefaultGlobals = false; + + // used only when Resource == true + llvm::dxil::ResourceClass ResourceClass = llvm::dxil::ResourceClass::UAV; hekota wrote: Yes, the indivi

[clang] [llvm] [LTO] Reduce memory usage for import lists (PR #106772)

2024-08-30 Thread Kazu Hirata via cfe-commits
@@ -174,51 +174,33 @@ std::string llvm::computeLTOCacheKey( for (auto GUID : ExportsGUID) Hasher.update(ArrayRef((uint8_t *)&GUID, sizeof(GUID))); - // Include the hash for every module we import functions from. The set of - // imported symbols for each module may affe

[clang] [HLSL] Implement TransformHLSLAttributedResourceType (PR #106673)

2024-08-30 Thread Helena Kotas via cfe-commits
hekota wrote: > Is there some other way to slice this so that there's a smaller part of your > larger change that can actually be tested? The thing is that we are already using resource attributes in many places, and they all need to be updated when we switch to having the attributes on types

[clang] [HLSL] Implement TransformHLSLAttributedResourceType (PR #106673)

2024-08-30 Thread Helena Kotas via cfe-commits
https://github.com/hekota closed https://github.com/llvm/llvm-project/pull/106673 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 02654f7 - [HLSL][Doc] Document multi-argument resolution (#104474)

2024-08-30 Thread via cfe-commits
Author: Chris B Date: 2024-08-30T16:18:46-05:00 New Revision: 02654f7370638889b989b4d776d35c3d47c87cdd URL: https://github.com/llvm/llvm-project/commit/02654f7370638889b989b4d776d35c3d47c87cdd DIFF: https://github.com/llvm/llvm-project/commit/02654f7370638889b989b4d776d35c3d47c87cdd.diff LOG:

[clang] [HLSL][Doc] Document multi-argument resolution (PR #104474)

2024-08-30 Thread Chris B via cfe-commits
https://github.com/llvm-beanz closed https://github.com/llvm/llvm-project/pull/104474 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Allow truncation to scalar (PR #104844)

2024-08-30 Thread Chris B via cfe-commits
@@ -143,19 +143,3 @@ float test_dot_float3(float3 p0, float3 p1) { return dot(p0, p1); } // CHECK: %dx.dot = call float @llvm.dx.dot4.v4f32(<4 x float> %0, <4 x float> %1) // CHECK: ret float %dx.dot float test_dot_float4(float4 p0, float4 p1) { return dot(p0, p1); } - -// CH

[clang-tools-extra] [NFC][clang-tidy] Add type annotations to add_new_check.py (PR #106801)

2024-08-30 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank created https://github.com/llvm/llvm-project/pull/106801 ``` python3 -m mypy --strict clang-tools-extra/clang-tidy/add_new_check.py Success: no issues found in 1 source file ``` >From 0213feed46b0cb7ba38410c26eba4d1d7226bd5b Mon Sep 17 00:00:00 2001 From: Nicolas v

[clang-tools-extra] [NFC][clang-tidy] Add type annotations to add_new_check.py (PR #106801)

2024-08-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-tidy Author: Nicolas van Kempen (nicovank) Changes ``` python3 -m mypy --strict clang-tools-extra/clang-tidy/add_new_check.py Success: no issues found in 1 source file ``` --- Full diff: https://github.com/llvm/llvm-project/pull/106801.diff 1

[clang] [clang] function template non-call partial ordering fixes (PR #106829)

2024-08-30 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/106829 This applies to function template non-call partial ordering the same provisional wording change applied in the call context: Don't perform the consistency check on return type and parameters which didn't have

[clang] [clang][bytecode] Implement __noop (PR #106714)

2024-08-30 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/106714 >From b04dc6d69039eeabe177cc5d109970734e0c29ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 30 Aug 2024 13:45:37 +0200 Subject: [PATCH] [clang][bytecode] Implement __noop This does n

[clang-tools-extra] [clangd] Update TidyFastChecks for release/19.x (PR #106354)

2024-08-30 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 approved this pull request. https://github.com/llvm/llvm-project/pull/106354 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Zero init unspecified fields in initializers in C (PR #97121)

2024-08-30 Thread via cfe-commits
yabinc wrote: > It probably makes sense to add a helper like the following to CodeGenModule > or something like that: > > ``` > bool shouldZeroInitPadding() { > // Comment explaining reasoning for this rule > return !CGM.getLangOpts().CPlusPlus; > } > ``` > > So we don't have `// See c

[clang] [llvm] [MC] Emit a jump table size section (PR #101962)

2024-08-30 Thread Saleem Abdulrasool via cfe-commits
@@ -2764,10 +2771,59 @@ void AsmPrinter::emitJumpTableInfo() { for (const MachineBasicBlock *MBB : JTBBs) emitJumpTableEntry(MJTI, MBB, JTI); } + + if (EmitJumpTableSizesSection) +emitJumpTableSizesSection(MJTI, F); + if (!JTInDiffSection) OutStreamer->

[clang] [clang][bytecode] Diagnose comparisons with literals (PR #106734)

2024-08-30 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/106734 >From bbf8b0f42845ada6ddb3935d975b06f9044b3c10 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 30 Aug 2024 15:51:17 +0200 Subject: [PATCH] [clang][bytecode] Diagnose comparisons with lit

[clang] Fix implicit conversion rank ordering (PR #106811)

2024-08-30 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp approved this pull request. https://github.com/llvm/llvm-project/pull/106811 ___ 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 type annotations to add_new_check.py, fix minor bug (PR #106801)

2024-08-30 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank updated https://github.com/llvm/llvm-project/pull/106801 >From 6d4241a1858a0c46ceedf3034191a606af2e3941 Mon Sep 17 00:00:00 2001 From: Nicolas van Kempen Date: Fri, 30 Aug 2024 23:18:37 -0400 Subject: [PATCH] [clang-tidy] Add type annotations to add_new_check.py, fix

[clang] [clang][bytecode] Implement __noop (PR #106714)

2024-08-30 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/106714 >From 0423c99a3b539e20c807ae4a773521a5ad5063c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Fri, 30 Aug 2024 13:45:37 +0200 Subject: [PATCH] [clang][bytecode] Implement __noop This does n

[clang] [clang][bytecode][NFC] Check for custom typechecking in call cleanup (PR #106826)

2024-08-30 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/106826 The comment already explains that this is only true for _some_ builtin functions. This also brings the time it takes me to run the builtin-functions.cpp test locally from 50s down to 47s. >From e38266cd0fa28e

[clang] Deprecate -fheinous-gnu-extensions; introduce a new warning flag (PR #105821)

2024-08-30 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-x86_64-linux-abi-test` running on `sie-linux-worker2` while building `clang` at step 7 "abi-test-suite". Full details are available at: https://lab.llvm.org/buildbot/#/builders/8/builds/3716 Here is the relevant piece

[clang] Fix implicit conversion rank ordering (PR #106811)

2024-08-30 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Chris B (llvm-beanz) Changes DXC prefers dimension-preserving conversions over precision-losing conversions. This means a double4 -> float4 conversion is preferred over a double4 -> double3 or double4 -> double conversion. --- Full diff:

[clang] [HLSL] Implement output parameter (PR #101083)

2024-08-30 Thread John McCall via cfe-commits
@@ -285,6 +285,13 @@ class CallArgList : public SmallVector { /// A value to "use" after the writeback, or null. llvm::Value *ToUse; + +/// An Expression representing a cast from the temporary's type to the +/// source l-value's type. +const Expr *CastExpr;

[clang] [libc] [libc] Use correct names for locale variants in spec.td (PR #106806)

2024-08-30 Thread Michael Jones via cfe-commits
https://github.com/michaelrj-google approved this pull request. LGTM from libc side https://github.com/llvm/llvm-project/pull/106806 ___ 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-08-30 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert commented: This probably fits better in `Sema/SemaDeclAttr.cpp`. Maybe `checkLockFunAttrCommon` is a good place. Add a test to `clang/test/Sema/attr-capabilities.c{,pp}`. https://github.com/llvm/llvm-project/pull/67520 __

[clang] [clang][bytecode][NFC] Check for custom typechecking in call cleanup (PR #106826)

2024-08-30 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/106826 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] function template non-call partial ordering fixes (PR #106829)

2024-08-30 Thread Matheus Izvekov via cfe-commits
mizvekov wrote: FYI @DavidTruby @DavidSpickett https://github.com/llvm/llvm-project/pull/106829 ___ 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-08-30 Thread Aaron Puchert via cfe-commits
https://github.com/aaronpuchert edited https://github.com/llvm/llvm-project/pull/67520 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LLVM] Add IRNormalizer Pass (PR #68176)

2024-08-30 Thread Puyan Lotfi via cfe-commits
plotfi wrote: @justinfargnoli Is there anything I can do to help with moving this forward, what seems to be the blocker on this at this point (asking to re-attain context)? https://github.com/llvm/llvm-project/pull/68176 ___ cfe-commits mailing list

[clang] [HLSL] Add testing for space parameter on global constants (PR #106782)

2024-08-30 Thread Damyan Pepper via cfe-commits
https://github.com/damyanp requested changes to this pull request. https://github.com/llvm/llvm-project/pull/106782 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LTO] Reduce memory usage for import lists (PR #106772)

2024-08-30 Thread Kazu Hirata via cfe-commits
@@ -1827,15 +1831,13 @@ Expected FunctionImporter::importFunctions( if (Error Err = SrcModule->materializeMetadata()) return std::move(Err); -auto &ImportGUIDs = FunctionsToImportPerModule->second; - // Find the globals to import SetVector GlobalsToImpo

[clang] [clang-format] Correctly annotate braces in ObjC square brackets (PR #106654)

2024-08-30 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/106654 ___ 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 type annotations to add_new_check.py, fix minor bug (PR #106801)

2024-08-30 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank updated https://github.com/llvm/llvm-project/pull/106801 >From 6d4241a1858a0c46ceedf3034191a606af2e3941 Mon Sep 17 00:00:00 2001 From: Nicolas van Kempen Date: Fri, 30 Aug 2024 23:18:37 -0400 Subject: [PATCH] [clang-tidy] Add type annotations to add_new_check.py, fix

[clang] [HLSL] Implement output parameter (PR #101083)

2024-08-30 Thread John McCall via cfe-commits
@@ -7071,6 +7071,102 @@ class ArraySectionExpr : public Expr { void setRBracketLoc(SourceLocation L) { RBracketLoc = L; } }; +/// This class represents temporary values used to represent inout and out +/// arguments in HLSL. From the callee perspective these parameters are m

[clang] [llvm] [Chore] Fix `formating` typos. NFC. (PR #106817)

2024-08-30 Thread via cfe-commits
https://github.com/c8ef edited https://github.com/llvm/llvm-project/pull/106817 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][bytecode][NFC] Implement MemberPointer::toDiagnosticString() (PR #106825)

2024-08-30 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr updated https://github.com/llvm/llvm-project/pull/106825 >From fd47ce2d92865a5c9e5307478a10dd2c8b91ac44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 31 Aug 2024 02:56:46 +0200 Subject: [PATCH] [clang][bytecode][NFC] Implement MemberPointer

[clang] [llvm] [LTO] Reduce memory usage for import lists (PR #106772)

2024-08-30 Thread Mingming Liu via cfe-commits
@@ -1827,15 +1831,13 @@ Expected FunctionImporter::importFunctions( if (Error Err = SrcModule->materializeMetadata()) return std::move(Err); -auto &ImportGUIDs = FunctionsToImportPerModule->second; - // Find the globals to import SetVector GlobalsToImpo

[clang] [clang][bytecode][NFC] Implement MemberPointer::toDiagnosticString() (PR #106825)

2024-08-30 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/106825 None >From 7d3a2ba57c5eefe47c2ccc57584881efdef41262 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Sat, 31 Aug 2024 02:56:46 +0200 Subject: [PATCH] [clang][bytecode][NFC] Implement MemberP

[clang] [llvm] [Chore] Fix `formating` typos. NFC. (PR #106817)

2024-08-30 Thread via cfe-commits
c8ef wrote: ```   | # \| /var/lib/buildkite-agent/builds/linux-56-59b8f5d88-c4bpt-1/llvm-project/github-pull-requests/libcxx/test/std/utilities/charconv/charconv.to.chars/integral.pass.cpp:25:64: error: declaration of 'uint64_t' must be imported from module 'std_cstdint' before it is required

[clang] [clang-tools-extra] [lld] [lldb] [llvm] [mlir] [polly] [NFC] Add explicit #include llvm-config.h where its macros are used. (PR #106810)

2024-08-30 Thread Daniil Fukalov via cfe-commits
https://github.com/dfukalov created https://github.com/llvm/llvm-project/pull/106810 This is the second part. Without these explicit includes, removing other headers, who implicitly include llvm-config.h, may have non-trivial side effects. For example, `clagd` may report even `llvm-config.h`

[clang-tools-extra] [clang-tidy] Add type annotations to add_new_check.py, fix minor bug (PR #106801)

2024-08-30 Thread Nicolas van Kempen via cfe-commits
https://github.com/nicovank edited https://github.com/llvm/llvm-project/pull/106801 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [HLSL] Implement output parameter (PR #101083)

2024-08-30 Thread John McCall via cfe-commits
@@ -11427,6 +11427,19 @@ static void AnalyzeImplicitConversions( return; } + if (auto *OutArgE = dyn_cast(E)) { +// The base expression is only used to initialize the parameter for +// arguments to `inout` parameters, so we only traverse down the base +// ex

[clang] [HLSL] Implement output parameter (PR #101083)

2024-08-30 Thread John McCall via cfe-commits
@@ -7071,6 +7071,102 @@ class ArraySectionExpr : public Expr { void setRBracketLoc(SourceLocation L) { RBracketLoc = L; } }; +/// This class represents temporary values used to represent inout and out +/// arguments in HLSL. From the callee perspective these parameters are m

[clang] [clang-format] Correctly annotate braces in macro definition (PR #106662)

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

[clang] [llvm] [LTO] Reduce memory usage for import lists (PR #106772)

2024-08-30 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata updated https://github.com/llvm/llvm-project/pull/106772 >From 2013008e1e0cf7df73b735d1ecfaf927b49542fd Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Thu, 29 Aug 2024 09:44:16 -0700 Subject: [PATCH 1/2] [LTO] Reduce memory usage for import lists This patch

<    1   2   3   4   5   >