summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/GlobalISel/RegisterBank.cpp
diff options
context:
space:
mode:
authorDaniel Sanders <daniel_l_sanders@apple.com>2017-01-18 14:17:50 +0000
committerDaniel Sanders <daniel_l_sanders@apple.com>2017-01-18 14:17:50 +0000
commit517b61cb69d6cf19841c07242dc1c7dc901736c4 (patch)
tree735cbd5226c4be53ca4d0f41337cf1f8936563a8 /llvm/lib/CodeGen/GlobalISel/RegisterBank.cpp
parentdf7c6ef96fde9369baf4cdd5a343088e5b3e65cc (diff)
downloadbcm5719-llvm-517b61cb69d6cf19841c07242dc1c7dc901736c4.tar.gz
bcm5719-llvm-517b61cb69d6cf19841c07242dc1c7dc901736c4.zip
Re-commit: [globalisel] Tablegen-erate current Register Bank Information
Summary: Adds a RegisterBank tablegen class that can be used to declare the register banks and an associated tablegen pass to generate the necessary code. Changes since last commit: The new tablegen pass is now correctly guarded by LLVM_BUILD_GLOBAL_ISEL and this should fix the buildbots however it may not be the whole fix. The previous buildbot failures suggest there may be a memory bug lurking that I'm unable to reproduce (including when using asan) or spot in the source. If they re-occur on this commit then I'll need assistance from the bot owners to track it down. Reviewers: t.p.northover, ab, rovka, qcolombet Reviewed By: qcolombet Subscribers: aditya_nandakumar, rengolin, kristof.beyls, vkalintiris, mgorny, dberris, llvm-commits, rovka Differential Revision: https://reviews.llvm.org/D27338 llvm-svn: 292367
Diffstat (limited to 'llvm/lib/CodeGen/GlobalISel/RegisterBank.cpp')
-rw-r--r--llvm/lib/CodeGen/GlobalISel/RegisterBank.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/GlobalISel/RegisterBank.cpp b/llvm/lib/CodeGen/GlobalISel/RegisterBank.cpp
index 49d676f11da..8999a2f2400 100644
--- a/llvm/lib/CodeGen/GlobalISel/RegisterBank.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/RegisterBank.cpp
@@ -19,10 +19,11 @@ using namespace llvm;
const unsigned RegisterBank::InvalidID = UINT_MAX;
-RegisterBank::RegisterBank(unsigned ID, const char *Name, unsigned Size,
- const uint32_t *CoveredClasses)
+RegisterBank::RegisterBank(
+ unsigned ID, const char *Name, unsigned Size,
+ const uint32_t *CoveredClasses, unsigned NumRegClasses)
: ID(ID), Name(Name), Size(Size) {
- ContainedRegClasses.resize(200);
+ ContainedRegClasses.resize(NumRegClasses);
ContainedRegClasses.setBitsInMask(CoveredClasses);
}
OpenPOWER on IntegriCloud