1 //===- RegAllocCommon.h - Utilities shared between allocators ---*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef LLVM_CODEGEN_REGALLOCCOMMON_H
11 #define LLVM_CODEGEN_REGALLOCCOMMON_H
12 
13 #include <functional>
14 
15 namespace llvm {
16 
17 class TargetRegisterClass;
18 class TargetRegisterInfo;
19 
20 typedef std::function<bool(const TargetRegisterInfo &TRI,
21                            const TargetRegisterClass &RC)> RegClassFilterFunc;
22 
23 /// Default register class filter function for register allocation. All virtual
24 /// registers should be allocated.
25 static inline bool allocateAllRegClasses(const TargetRegisterInfo &,
26                                          const TargetRegisterClass &) {
27   return true;
28 }
29 
30 }
31 
32 #endif // LLVM_CODEGEN_REGALLOCCOMMON_H
33