aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/SPIRV
diff options
context:
space:
mode:
authorKai Nacke <kai.peter.nacke@ibm.com>2024-07-25 09:41:55 -0400
committerGitHub <noreply@github.com>2024-07-25 09:41:55 -0400
commita79db96ec0decca4fe45579e039cf5589345b3ed (patch)
treef058e40ec30591dfe5bb35ae4d55c63d2a4fd728 /llvm/lib/Target/SPIRV
parentb2b68c241a61bbbe0e2f89cb2182f1b1bec564b6 (diff)
downloadllvm-a79db96ec0decca4fe45579e039cf5589345b3ed.zip
llvm-a79db96ec0decca4fe45579e039cf5589345b3ed.tar.gz
llvm-a79db96ec0decca4fe45579e039cf5589345b3ed.tar.bz2
[GISel][TableGen] Generate getRegBankFromRegClass (#99896)
Generating the mapping from a register class to a register bank is complex: - there can be lots of register classes - the mapping may be ambiguos - a register class can span several register banks (e.g. a register class containing all registers) - the type information is not enough to decide which register bank to map to (e.g. a register class containing floating point and vector registers, and all register can represent a f64 value) The approach taken here is to encode the register banks in an array indexed by the ID of the register class. To save space, the entries are packed into chunks of size 2^n.
Diffstat (limited to 'llvm/lib/Target/SPIRV')
-rw-r--r--llvm/lib/Target/SPIRV/SPIRVRegisterBankInfo.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Target/SPIRV/SPIRVRegisterBankInfo.cpp b/llvm/lib/Target/SPIRV/SPIRVRegisterBankInfo.cpp
index ecd99f1..0ed4546 100644
--- a/llvm/lib/Target/SPIRV/SPIRVRegisterBankInfo.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVRegisterBankInfo.cpp
@@ -12,6 +12,7 @@
#include "SPIRVRegisterBankInfo.h"
#include "SPIRVRegisterInfo.h"
+#include "llvm/ADT/Twine.h"
#include "llvm/CodeGen/RegisterBank.h"
#define GET_REGINFO_ENUM