[PATCH] D27338: [globalisel] Tablegen-erate current Register Bank Information
Daniel Sanders via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 13 07:54:02 PST 2016
dsanders added inline comments.
================
Comment at: lib/Target/AArch64/AArch64RegisterBankInfo.cpp:46
AlreadyInit = true;
- // Initialize the GPR bank.
- createRegisterBank(AArch64::GPRRegBankID, "GPR");
- // The GPR register bank is fully defined by all the registers in
- // GR64all + its subclasses.
- addRegBankCoverage(AArch64::GPRRegBankID, AArch64::GPR64allRegClassID, TRI);
+ initGeneratedInfo(TRI);
+// Now, the content.
----------------
ab wrote:
> How about:
> - introduce an intermediate class, 'AArch64GenRegisterBankInfo'
> - make the RegBanks array a member
> - replace initGeneratedInfo with the ctor
> - remove the AlreadyInit logic
> - consolidate the now-redundant GET_REGBANK_*IFACE* into a single GET_REGBANK_IMPLEMENTATION to avoid having everything in the header
>
> WDYT?
That makes sense to me.
https://reviews.llvm.org/D27338
More information about the llvm-commits
mailing list