[PATCH] D27809: [globalisel] Move as much RegisterBank initialization to the constructor as possible

Quentin Colombet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 19 17:49:04 PST 2016


qcolombet requested changes to this revision.
qcolombet added inline comments.
This revision now requires changes to proceed.


================
Comment at: lib/CodeGen/GlobalISel/RegisterBank.cpp:30
+  ContainedRegClasses.resize(TRI.getNumRegClasses());
+  ContainedRegClasses.setBitsInMask(Mask);
+}
----------------
We shouldn't need the TRI to do that.
By construction, we already have a limit of 64, but we will refine by making the tablegen backend smarter.

Indeed, eventually, TableGen shouldn't need this method, otherwise we missed something.
In particular, it is not unlikely that the TableGen backend will need to process the TargetRegisterInfo.td file with the TargetRegisterBank.td.
That should be automatic as I expect something like this in the XXXRegisterBank.td:
----
include XXXRegisterInfo.td

def MyBank : RegisterBank<(list of register classes)>
----


https://reviews.llvm.org/D27809





More information about the llvm-commits mailing list