[llvm] 4d9d07c - [CodeGen] Use RegClassFilterFunc where appropriate (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 16 15:43:44 PDT 2022
Author: Kazu Hirata
Date: 2022-07-16T15:43:33-07:00
New Revision: 4d9d07c5fbe9968d6f0508431062b31fbaead691
URL: https://github.com/llvm/llvm-project/commit/4d9d07c5fbe9968d6f0508431062b31fbaead691
DIFF: https://github.com/llvm/llvm-project/commit/4d9d07c5fbe9968d6f0508431062b31fbaead691.diff
LOG: [CodeGen] Use RegClassFilterFunc where appropriate (NFC)
Added:
Modified:
llvm/lib/CodeGen/RegAllocFast.cpp
llvm/lib/CodeGen/RegAllocGreedy.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/RegAllocFast.cpp b/llvm/lib/CodeGen/RegAllocFast.cpp
index 72ceaa768803..3cec6908460a 100644
--- a/llvm/lib/CodeGen/RegAllocFast.cpp
+++ b/llvm/lib/CodeGen/RegAllocFast.cpp
@@ -1580,8 +1580,7 @@ FunctionPass *llvm::createFastRegisterAllocator() {
return new RegAllocFast();
}
-FunctionPass *llvm::createFastRegisterAllocator(
- std::function<bool(const TargetRegisterInfo &TRI,
- const TargetRegisterClass &RC)> Ftor, bool ClearVirtRegs) {
+FunctionPass *llvm::createFastRegisterAllocator(RegClassFilterFunc Ftor,
+ bool ClearVirtRegs) {
return new RegAllocFast(Ftor, ClearVirtRegs);
}
diff --git a/llvm/lib/CodeGen/RegAllocGreedy.cpp b/llvm/lib/CodeGen/RegAllocGreedy.cpp
index 2efb98ae200d..d01989fbb2fa 100644
--- a/llvm/lib/CodeGen/RegAllocGreedy.cpp
+++ b/llvm/lib/CodeGen/RegAllocGreedy.cpp
@@ -181,15 +181,10 @@ FunctionPass* llvm::createGreedyRegisterAllocator() {
}
namespace llvm {
-FunctionPass* createGreedyRegisterAllocator(
- std::function<bool(const TargetRegisterInfo &TRI,
- const TargetRegisterClass &RC)> Ftor);
-
+FunctionPass *createGreedyRegisterAllocator(RegClassFilterFunc Ftor);
}
-FunctionPass* llvm::createGreedyRegisterAllocator(
- std::function<bool(const TargetRegisterInfo &TRI,
- const TargetRegisterClass &RC)> Ftor) {
+FunctionPass *llvm::createGreedyRegisterAllocator(RegClassFilterFunc Ftor) {
return new RAGreedy(Ftor);
}
More information about the llvm-commits
mailing list