[llvm-branch-commits] [llvm] RegAlloc: Do not fatal error if there are no registers in the alloc order (PR #119640)
https://github.com/ilovepi approved this pull request. LGTM. https://github.com/llvm/llvm-project/pull/119640 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [llvm] RegAlloc: Do not fatal error if there are no registers in the alloc order (PR #119640)
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/119640 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [llvm] [Statepoint] Treat undef operands less specially (PR #119682)
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/119682 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [llvm] [Statepoint] Treat undef operands less specially (PR #119682)
https://github.com/ilovepi approved this pull request. https://github.com/llvm/llvm-project/pull/119682 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [llvm] RegAlloc: Fix failure on undef use when all registers are reserved (PR #119647)
https://github.com/ilovepi approved this pull request. https://github.com/llvm/llvm-project/pull/119647 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [llvm] RegAlloc: Fix failure on undef use when all registers are reserved (PR #119647)
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/119647 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang-doc] Precommit test case for functions with templated parameters and return (PR #119814)
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/119814 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang-doc] Precommit test case for functions with templated parameters and return (PR #119814)
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/119814 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [llvm] b858dfc - Fix formatting
Author: Ian Wood Date: 2024-12-13T21:52:05-08:00 New Revision: b858dfc01b6da1675f3ed99416063e118dd27324 URL: https://github.com/llvm/llvm-project/commit/b858dfc01b6da1675f3ed99416063e118dd27324 DIFF: https://github.com/llvm/llvm-project/commit/b858dfc01b6da1675f3ed99416063e118dd27324.diff LOG: Fix formatting Added: Modified: llvm/include/llvm/Support/TypeName.h Removed: diff --git a/llvm/include/llvm/Support/TypeName.h b/llvm/include/llvm/Support/TypeName.h index 9547e76a7fa79b..518a39ee02a53a 100644 --- a/llvm/include/llvm/Support/TypeName.h +++ b/llvm/include/llvm/Support/TypeName.h @@ -23,8 +23,7 @@ namespace llvm { /// The returned StringRef will point into a static storage duration string. /// However, it may not be null terminated and may be some strangely aligned /// inner substring of a larger string. -template -inline StringRef getTypeName() { +template inline StringRef getTypeName() { #if defined(__clang__) || defined(__GNUC__) StringRef Name = __PRETTY_FUNCTION__; ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang-doc] Use QualName in Markdown output (PR #119815)
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/119815 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang-doc] Use QualName in Markdown output (PR #119815)
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/119815 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang-doc] Precommit test case for functions with templated parameters and return (PR #119814)
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/119814 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [llvm] AMDGPU: Delete spills of undef values (PR #119684)
@@ -54,3 +54,45 @@ body: | SI_SPILL_S64_SAVE renamable $sgpr4_sgpr5, %stack.0, implicit $exec, implicit $sgpr96_sgpr97_sgpr98_sgpr99, implicit $sgpr32 :: (store (s64) into %stack.0, align 4, addrspace 5) ... + +--- +name: sgpr_spill_s32_undef +tracksRegLiveness: true +machineFunctionInfo: + isEntryFunction: true + hasSpilledSGPRs: true + scratchRSrcReg: '$sgpr96_sgpr97_sgpr98_sgpr99' + stackPtrOffsetReg: '$sgpr32' +stack: + - { id: 0, type: spill-slot, size: 4, alignment: 4, stack-id: sgpr-spill } +body: | + bb.0: +; CHECK-LABEL: name: sgpr_spill_s32_undef +; CHECK: body: +; CHECK-NEXT: bb.0: +; CHECK-NOT: {{.+}} ilovepi wrote: What's the purpose of this check? It seems like if you don't want to have any output before the next check, you'd just use `CHECK-NEXT: ...` instead of having this between them. https://github.com/llvm/llvm-project/pull/119684 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang-doc][NFC] Make test resilient to line changes (PR #119811)
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/119811 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang-doc][NFC] Make test resilient to line changes (PR #119811)
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/119811 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang-doc] Use QualName in Markdown output (PR #119815)
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/119815 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang-doc] Use QualName in Markdown output (PR #119815)
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/119815 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang-doc] Precommit test case for functions with templated parameters and return (PR #119814)
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/119814 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [llvm] 68d7d77 - Revert "[NFC] Don't recompute type name (#119631)"
Author: Ian Wood Date: 2024-12-13T09:37:36-08:00 New Revision: 68d7d771d84cefff427cfa47e3bf2beeaf2706a6 URL: https://github.com/llvm/llvm-project/commit/68d7d771d84cefff427cfa47e3bf2beeaf2706a6 DIFF: https://github.com/llvm/llvm-project/commit/68d7d771d84cefff427cfa47e3bf2beeaf2706a6.diff LOG: Revert "[NFC] Don't recompute type name (#119631)" This reverts commit 003a721c1c9e3a99d6d0c1a6755443b260235537. Added: Modified: llvm/include/llvm/Support/TypeName.h Removed: diff --git a/llvm/include/llvm/Support/TypeName.h b/llvm/include/llvm/Support/TypeName.h index 61ba09c2163047..9547e76a7fa79b 100644 --- a/llvm/include/llvm/Support/TypeName.h +++ b/llvm/include/llvm/Support/TypeName.h @@ -13,8 +13,18 @@ namespace llvm { -namespace detail { -template inline StringRef getTypeNameImpl() { +/// We provide a function which tries to compute the (demangled) name of a type +/// statically. +/// +/// This routine may fail on some platforms or for particularly unusual types. +/// Do not use it for anything other than logging and debugging aids. It isn't +/// portable or dependendable in any real sense. +/// +/// The returned StringRef will point into a static storage duration string. +/// However, it may not be null terminated and may be some strangely aligned +/// inner substring of a larger string. +template +inline StringRef getTypeName() { #if defined(__clang__) || defined(__GNUC__) StringRef Name = __PRETTY_FUNCTION__; @@ -48,22 +58,6 @@ template inline StringRef getTypeNameImpl() { return "UNKNOWN_TYPE"; #endif } -} // namespace detail - -/// We provide a function which tries to compute the (demangled) name of a type -/// statically. -/// -/// This routine may fail on some platforms or for particularly unusual types. -/// Do not use it for anything other than logging and debugging aids. It isn't -/// portable or dependendable in any real sense. -/// -/// The returned StringRef will point into a static storage duration string. -/// However, it may not be null terminated and may be some strangely aligned -/// inner substring of a larger string. -template inline StringRef getTypeName() { - static StringRef Name = detail::getTypeNameImpl(); - return Name; -} } // namespace llvm ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang-doc] Precommit test case for functions with templated parameters and return (PR #119814)
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/119814 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang-doc] Precommit test case for functions with templated parameters and return (PR #119814)
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/119814 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang-tools-extra] [clang-doc] Add tests for Markdown output with C++ templates (PR #119813)
https://github.com/ilovepi edited https://github.com/llvm/llvm-project/pull/119813 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang-tools-extra] [clang-doc] Add tests for Markdown output with C++ templates (PR #119813)
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/119813 >From e83d6d47cc414860bbb991e023e70a1071ca27eb Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Thu, 12 Dec 2024 20:26:53 -0800 Subject: [PATCH 1/2] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20ch?= =?UTF-8?q?anges=20to=20main=20this=20commit=20is=20based=20on?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Created using spr 1.3.6-beta.1 [skip ci] --- .../test/clang-doc/templates.cpp | 133 +- 1 file changed, 67 insertions(+), 66 deletions(-) diff --git a/clang-tools-extra/test/clang-doc/templates.cpp b/clang-tools-extra/test/clang-doc/templates.cpp index 4d4a25b8d3b820..05a3dab71f48a1 100644 --- a/clang-tools-extra/test/clang-doc/templates.cpp +++ b/clang-tools-extra/test/clang-doc/templates.cpp @@ -1,76 +1,77 @@ // RUN: rm -rf %t // RUN: mkdir %t -// RUN: echo "" > %t/compile_flags.txt -// RUN: cp "%s" "%t/test.cpp" -// RUN: clang-doc --doxygen --executor=standalone -p %t %t/test.cpp -output=%t/docs -// RUN: cat %t/docs/index.yaml | FileCheck %s --check-prefix=CHECK -// RUN: rm -rf %t +// RUN: clang-doc --doxygen --executor=standalone %s -output=%t/docs +// RUN: cat %t/docs/index.yaml | FileCheck %s --check-prefix=YAML + +// YAML: --- +// YAML-NEXT: USR: '{{([0-9A-F]{40})}}' + +template +void ParamPackFunction(T... args); + +// YAML-NEXT: ChildFunctions: +// YAML-NEXT: - USR: '{{([0-9A-F]{40})}}' +// YAML-NEXT:Name:'ParamPackFunction' +// YAML-NEXT:Location: +// YAML-NEXT: - LineNumber: [[# @LINE - 6]] +// YAML-NEXT:Filename:'{{.*}}' +// YAML-NEXT:Params: +// YAML-NEXT: - Type: +// YAML-NEXT: Name:'T...' +// YAML-NEXT: QualName:'T...' +// YAML-NEXT:Name:'args' +// YAML-NEXT:ReturnType: +// YAML-NEXT: Type: +// YAML-NEXT:Name:'void' +// YAML-NEXT:QualName:'void' +// YAML-NEXT:Template: +// YAML-NEXT: Params: +// YAML-NEXT:- Contents:'class... T' template void function(T x) {} +// YAML-NEXT: - USR: '{{([0-9A-F]{40})}}' +// YAML-NEXT: Name:'function' +// YAML-NEXT: DefLocation: +// YAML-NEXT: LineNumber: [[# @LINE - 5]] +// YAML-NEXT: Filename:'{{.*}}' +// YAML-NEXT: Params: +// YAML-NEXT: - Type: +// YAML-NEXT: Name:'T' +// YAML-NEXT: QualName:'T' +// YAML-NEXT: Name:'x' +// YAML-NEXT: ReturnType: +// YAML-NEXT: Type: +// YAML-NEXT: Name:'void' +// YAML-NEXT: QualName:'void' +// YAML-NEXT: Template: +// YAML-NEXT: Params: +// YAML-NEXT: - Contents:'typename T' +// YAML-NEXT: - Contents:'int U = 1' + template<> void function(bool x) {} -template -void ParamPackFunction(T... args); +// YAML-NEXT: - USR: '{{([0-9A-F]{40})}}' +// YAML-NEXT: Name:'function' +// YAML-NEXT: DefLocation: +// YAML-NEXT: LineNumber: [[# @LINE - 6]] +// YAML-NEXT: Filename:'{{.*}}' +// YAML-NEXT: Params: +// YAML-NEXT: - Type: +// YAML-NEXT: Name:'_Bool' +// YAML-NEXT: QualName:'_Bool' +// YAML-NEXT: Name:'x' +// YAML-NEXT: ReturnType: +// YAML-NEXT: Type: +// YAML-NEXT: Name:'void' +// YAML-NEXT: QualName:'void' +// YAML-NEXT: Template: +// YAML-NEXT: Specialization: +// YAML-NEXT: SpecializationOf: '{{([0-9A-F]{40})}}' +// YAML-NEXT: Params: +// YAML-NEXT: - Contents:'bool' +// YAML-NEXT: - Contents:'0' +// YAML-NEXT: ... -// CHECK: --- -// CHECK-NEXT: USR: '{{([0-9A-F]{40})}}' -// CHECK-NEXT: ChildFunctions: -// CHECK-NEXT: - USR: '{{([0-9A-F]{40})}}' -// CHECK-NEXT:Name:'ParamPackFunction' -// CHECK-NEXT:Location: -// CHECK-NEXT: - LineNumber: 16 -// CHECK-NEXT:Filename:'{{.*}}' -// CHECK-NEXT:Params: -// CHECK-NEXT: - Type: -// CHECK-NEXT: Name:'T...' -// CHECK-NEXT: QualName:'T...' -// CHECK-NEXT:Name:'args' -// CHECK-NEXT:ReturnType: -// CHECK-NEXT: Type: -// CHECK-NEXT:Name:'void' -// CHECK-NEXT:QualName:'void' -// CHECK-NEXT:Template: -// CHECK-NEXT: Params: -// CHECK-NEXT:- Contents:'class... T' -// CHECK-NEXT: - USR: '{{([0-9A-F]{40})}}' -// CHECK-NEXT: Name:'function' -// CHECK-NEXT: DefLocation: -// CHECK-NEXT: LineNumber: 10 -// CHECK-NEXT: Filename:'{{.*}}' -// CHECK-NEXT: Params: -// CHECK-NEXT: - Type: -// CHECK-
[llvm-branch-commits] [clang-doc] Use QualName in Markdown output (PR #119815)
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/119815 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang-doc] Use QualName in Markdown output (PR #119815)
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/119815 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang-tools-extra] [clang-doc] Add tests for Markdown output with C++ templates (PR #119813)
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/119813 >From e06d241a608bca23fce277b0a0a6138ea83d296f Mon Sep 17 00:00:00 2001 From: Paul Kirth Date: Fri, 13 Dec 2024 09:33:35 -0800 Subject: [PATCH] Remove extra newline Created using spr 1.3.6-beta.1 --- clang-tools-extra/test/clang-doc/templates.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/clang-tools-extra/test/clang-doc/templates.cpp b/clang-tools-extra/test/clang-doc/templates.cpp index 536b24161990aa..5ca8768cbdc43c 100644 --- a/clang-tools-extra/test/clang-doc/templates.cpp +++ b/clang-tools-extra/test/clang-doc/templates.cpp @@ -93,4 +93,3 @@ void function(bool x) {} // MD: *void function(_Bool x)* // MD: *Defined at {{.*}}templates.cpp#[[# @LINE - 27]]* - ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang-doc] Precommit test case for functions with templated parameters and return (PR #119814)
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/119814 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang-doc] Precommit test case for functions with templated parameters and return (PR #119814)
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/119814 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang-doc] Use QualName in Markdown output (PR #119815)
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/119815 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang-doc] Use QualName in Markdown output (PR #119815)
https://github.com/ilovepi updated https://github.com/llvm/llvm-project/pull/119815 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [lld, wasm] Replace config-> with ctx.arg. (PR #119835)
https://github.com/sbc100 commented: Could you add a little context to the PR description? i.e. Why is this better? Does this change also remove the old `config` global or just stop using it? Objectively this still like a regression in readability since it adds more visual noise and indirection.However, I get that we are trying to make lld more library-friendly. I'm just a little sad that it comes are this readability cost :( https://github.com/llvm/llvm-project/pull/119835 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [llvm] RegAlloc: Fix verifier error after failed allocation (PR #119690)
@@ -161,6 +163,40 @@ void RegAllocBase::postOptimization() { DeadRemats.clear(); } +void RegAllocBase::cleanupFailedVRegs() { + SmallSet JunkRegs; + + for (Register FailedReg : FailedVRegs) { +JunkRegs.insert(FailedReg); + +MCRegister PhysReg = VRM->getPhys(FailedReg); +LiveInterval &FailedInterval = LIS->getInterval(FailedReg); + +// The liveness information for the failed register and anything interfering +// with the physical register we arbitrarily chose is junk and needs to be +// deleted. +for (MCRegUnitIterator Units(PhysReg, TRI); Units.isValid(); ++Units) { + LiveIntervalUnion::Query &Q = Matrix->query(FailedInterval, *Units); + for (const LiveInterval *InterferingReg : Q.interferingVRegs()) +JunkRegs.insert(InterferingReg->reg()); +} + } + + // TODO: Probably need to set undef on any physreg uses not associated with + // a virtual register. ilovepi wrote: Aren't there places where we lower things/expand pseudos using physical regs before RegAlloc? We do some weird things for stuff like TLSDESC where ABI dictates we use particular registers. It's not a problem in this patch, but I want to understand better if we're doing things we shouldn't in the various lowerings and should consider addressing that. https://github.com/llvm/llvm-project/pull/119690 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [llvm] [DirectX] Split resource info into type and binding info. NFC (PR #119773)
@@ -303,44 +289,157 @@ class ResourceInfo { dxil::SamplerFeedbackType getFeedbackType() const; uint32_t getMultiSampleCount() const; - StringRef getName() const { -// TODO: Get the name from the symbol once we include one here. -return ""; - } dxil::ResourceClass getResourceClass() const { return RC; } dxil::ResourceKind getResourceKind() const { return Kind; } + bool operator==(const ResourceTypeInfo &RHS) const; + bool operator!=(const ResourceTypeInfo &RHS) const { return !(*this == RHS); } + bool operator<(const ResourceTypeInfo &RHS) const; + + void print(raw_ostream &OS, const DataLayout &DL) const; +}; + +//===--===// + +class ResourceBindingInfo { +public: + struct ResourceBinding { +uint32_t RecordID; +uint32_t Space; +uint32_t LowerBound; +uint32_t Size; + +bool operator==(const ResourceBinding &RHS) const { + return std::tie(RecordID, Space, LowerBound, Size) == + std::tie(RHS.RecordID, RHS.Space, RHS.LowerBound, RHS.Size); +} +bool operator!=(const ResourceBinding &RHS) const { + return !(*this == RHS); +} +bool operator<(const ResourceBinding &RHS) const { + return std::tie(RecordID, Space, LowerBound, Size) < + std::tie(RHS.RecordID, RHS.Space, RHS.LowerBound, RHS.Size); +} + }; + +private: + ResourceBinding Binding; + TargetExtType *HandleTy; + +public: + ResourceBindingInfo(uint32_t RecordID, uint32_t Space, uint32_t LowerBound, + uint32_t Size, TargetExtType *HandleTy) + : Binding{RecordID, Space, LowerBound, Size}, HandleTy(HandleTy) {} + void setBindingID(unsigned ID) { Binding.RecordID = ID; } const ResourceBinding &getBinding() const { return Binding; } + TargetExtType *getHandleTy() const { return HandleTy; } + const StringRef getName() const { +// TODO: Get the name from the symbol once we include one here. +return ""; + } - MDTuple *getAsMetadata(Module &M) const; - std::pair getAnnotateProps(Module &M) const; + MDTuple *getAsMetadata(Module &M, DXILResourceTypeMap &DRTM) const; + MDTuple *getAsMetadata(Module &M, dxil::ResourceTypeInfo RTI) const; - bool operator==(const ResourceInfo &RHS) const; - bool operator!=(const ResourceInfo &RHS) const { return !(*this == RHS); } - bool operator<(const ResourceInfo &RHS) const; + std::pair + getAnnotateProps(Module &M, DXILResourceTypeMap &DRTM) const; + std::pair + getAnnotateProps(Module &M, dxil::ResourceTypeInfo RTI) const; - void print(raw_ostream &OS, const DataLayout &DL) const; + bool operator==(const ResourceBindingInfo &RHS) const { +return std::tie(Binding, HandleTy) == std::tie(RHS.Binding, RHS.HandleTy); + } + bool operator!=(const ResourceBindingInfo &RHS) const { +return !(*this == RHS); + } + bool operator<(const ResourceBindingInfo &RHS) const { +return Binding < RHS.Binding; + } + + void print(raw_ostream &OS, DXILResourceTypeMap &DRTM, + const DataLayout &DL) const; + void print(raw_ostream &OS, dxil::ResourceTypeInfo RTI, + const DataLayout &DL) const; }; } // namespace dxil //===--===// -class DXILResourceMap { - SmallVector Infos; +class DXILResourceTypeMap { + struct Info { +dxil::ResourceClass RC; +dxil::ResourceKind Kind; +bool GloballyCoherent; +bool HasCounter; + }; + DenseMap Infos; hekota wrote: Why not `DenseMap Infos;` and return reference to the ResourceTypeInfo in the map in `operator[]` implementation? How is `Infos` even populated? https://github.com/llvm/llvm-project/pull/119773 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [llvm] [DirectX] Split resource info into type and binding info. NFC (PR #119773)
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/119773 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [llvm] RegAlloc: Do not fatal error if there are no registers in the alloc order (PR #119640)
https://github.com/qcolombet approved this pull request. https://github.com/llvm/llvm-project/pull/119640 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [llvm] RegAlloc: Fix failure on undef use when all registers are reserved (PR #119647)
https://github.com/qcolombet approved this pull request. https://github.com/llvm/llvm-project/pull/119647 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
[llvm-branch-commits] [clang] release/19.x: [clang-format] Fix idempotent format of hash in macro body (#118513) (PR #119503)
https://github.com/owenca approved this pull request. https://github.com/llvm/llvm-project/pull/119503 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits