summaryrefslogtreecommitdiff
path: root/lib/Target/AArch64/AArch64RegisterBankInfo.h
diff options
context:
space:
mode:
authorDaniel Sanders <daniel_l_sanders@apple.com>2017-01-16 15:34:43 +0000
committerDaniel Sanders <daniel_l_sanders@apple.com>2017-01-16 15:34:43 +0000
commit064b91fd98429cb5f7c7e6608e1177682f53ec51 (patch)
tree99bf299f07b0b90a92ecfd9343a22b6fb3a31078 /lib/Target/AArch64/AArch64RegisterBankInfo.h
parentb1c51125dd5b3fc6e130fb94d4188c493b1ad338 (diff)
Revert r292132: [globalisel] Tablegen-erate current Register Bank Information'...
Several buildbots encountered a crash in tablegen when building this commit. Reverting while I investigate the cause. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292136 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/AArch64/AArch64RegisterBankInfo.h')
-rw-r--r--lib/Target/AArch64/AArch64RegisterBankInfo.h29
1 files changed, 18 insertions, 11 deletions
diff --git a/lib/Target/AArch64/AArch64RegisterBankInfo.h b/lib/Target/AArch64/AArch64RegisterBankInfo.h
index bc609f422ac..97a36602359 100644
--- a/lib/Target/AArch64/AArch64RegisterBankInfo.h
+++ b/lib/Target/AArch64/AArch64RegisterBankInfo.h
@@ -16,30 +16,40 @@
#include "llvm/CodeGen/GlobalISel/RegisterBankInfo.h"
-#define GET_REGBANK_DECLARATIONS
-#include "AArch64GenRegisterBank.inc"
-
namespace llvm {
class TargetRegisterInfo;
+namespace AArch64 {
+enum {
+ GPRRegBankID = 0, /// General Purpose Registers: W, X.
+ FPRRegBankID = 1, /// Floating Point/Vector Registers: B, H, S, D, Q.
+ CCRRegBankID = 2, /// Conditional register: NZCV.
+ NumRegisterBanks
+};
+} // End AArch64 namespace.
+
class AArch64GenRegisterBankInfo : public RegisterBankInfo {
+private:
+ static RegisterBank *RegBanks[];
+
protected:
+ AArch64GenRegisterBankInfo();
enum PartialMappingIdx {
PMI_None = -1,
- PMI_FPR32 = 1,
+ PMI_GPR32 = 1,
+ PMI_GPR64,
+ PMI_FPR32,
PMI_FPR64,
PMI_FPR128,
PMI_FPR256,
PMI_FPR512,
- PMI_GPR32,
- PMI_GPR64,
PMI_FirstGPR = PMI_GPR32,
PMI_LastGPR = PMI_GPR64,
PMI_FirstFPR = PMI_FPR32,
PMI_LastFPR = PMI_FPR512,
- PMI_Min = PMI_FirstFPR,
+ PMI_Min = PMI_FirstGPR,
};
static RegisterBankInfo::PartialMapping PartMappings[];
@@ -51,7 +61,7 @@ protected:
Last3OpsIdx = 18,
DistanceBetweenRegBanks = 3,
FirstCrossRegCpyIdx = 21,
- LastCrossRegCpyIdx = 33,
+ LastCrossRegCpyIdx = 27,
DistanceBetweenCrossRegCpy = 2
};
@@ -80,9 +90,6 @@ protected:
/// register bank with a size of \p Size.
static const RegisterBankInfo::ValueMapping *
getCopyMapping(unsigned DstBankID, unsigned SrcBankID, unsigned Size);
-
-#define GET_TARGET_REGBANK_CLASS
-#include "AArch64GenRegisterBank.inc"
};
/// This class provides the information for the target register banks.