diff options
author | Christudasan Devadasan <christudasan.devadasan@amd.com> | 2024-07-22 16:49:39 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-22 16:49:39 +0530 |
commit | 15b41d207e15c96cf6f6a7e72cbf3c0044762df5 (patch) | |
tree | c157dec20a0f4f3c8e66584cb90c11ca599f8c83 /llvm/lib/CodeGen/RegAllocBasic.cpp | |
parent | dc82c774a74ad7e94d4c555e4cae1025e30f3876 (diff) | |
download | llvm-15b41d207e15c96cf6f6a7e72cbf3c0044762df5.zip llvm-15b41d207e15c96cf6f6a7e72cbf3c0044762df5.tar.gz llvm-15b41d207e15c96cf6f6a7e72cbf3c0044762df5.tar.bz2 |
[CodeGen] change prototype of regalloc filter function (#93525)
[CodeGen] Change the prototype of regalloc filter function
Change the prototype of the filter function so that we can
filter not just by RegClass. We need to implement more
complicated filter based upon some other info associated
with each register.
Patch provided by: Gang Chen (gangc@amd.com)
Diffstat (limited to 'llvm/lib/CodeGen/RegAllocBasic.cpp')
-rw-r--r-- | llvm/lib/CodeGen/RegAllocBasic.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/RegAllocBasic.cpp b/llvm/lib/CodeGen/RegAllocBasic.cpp index e78a4479..caf9c32 100644 --- a/llvm/lib/CodeGen/RegAllocBasic.cpp +++ b/llvm/lib/CodeGen/RegAllocBasic.cpp @@ -74,7 +74,7 @@ class RABasic : public MachineFunctionPass, void LRE_WillShrinkVirtReg(Register) override; public: - RABasic(const RegClassFilterFunc F = nullptr); + RABasic(const RegAllocFilterFunc F = nullptr); /// Return the pass name. StringRef getPassName() const override { return "Basic Register Allocator"; } @@ -168,10 +168,8 @@ void RABasic::LRE_WillShrinkVirtReg(Register VirtReg) { enqueue(&LI); } -RABasic::RABasic(RegClassFilterFunc F): - MachineFunctionPass(ID), - RegAllocBase(F) { -} +RABasic::RABasic(RegAllocFilterFunc F) + : MachineFunctionPass(ID), RegAllocBase(F) {} void RABasic::getAnalysisUsage(AnalysisUsage &AU) const { AU.setPreservesCFG(); @@ -333,6 +331,6 @@ FunctionPass* llvm::createBasicRegisterAllocator() { return new RABasic(); } -FunctionPass* llvm::createBasicRegisterAllocator(RegClassFilterFunc F) { +FunctionPass *llvm::createBasicRegisterAllocator(RegAllocFilterFunc F) { return new RABasic(F); } |