From 4d9d07c5fbe9968d6f0508431062b31fbaead691 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sat, 16 Jul 2022 15:43:33 -0700 Subject: [PATCH] [CodeGen] Use RegClassFilterFunc where appropriate (NFC) --- llvm/lib/CodeGen/RegAllocFast.cpp | 5 ++--- llvm/lib/CodeGen/RegAllocGreedy.cpp | 9 ++------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/llvm/lib/CodeGen/RegAllocFast.cpp b/llvm/lib/CodeGen/RegAllocFast.cpp index 72ceaa7..3cec690 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 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 2efb98a..d01989f 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 Ftor); - +FunctionPass *createGreedyRegisterAllocator(RegClassFilterFunc Ftor); } -FunctionPass* llvm::createGreedyRegisterAllocator( - std::function Ftor) { +FunctionPass *llvm::createGreedyRegisterAllocator(RegClassFilterFunc Ftor) { return new RAGreedy(Ftor); } -- 2.7.4