This allows the function to handle architectures with more than two register banks.
Depends on D27978
Paths
| Differential D27339
[globalisel][aarch64] Make getCopyMapping() take register banks ID's rather than IsGPR booleans ClosedPublic Authored by dsanders on Dec 2 2016, 5:35 AM.
Details Summary This allows the function to handle architectures with more than two register banks. Depends on D27978
Diff Detail
Event Timelinedsanders retitled this revision from to [globalisel][aarch64] Make getCopyMapping() take register banks ID's rather than IsGPR booleans. dsanders updated this object. dsanders added a parent revision: D27338: [globalisel] Tablegen-erate current Register Bank Information. Herald added subscribers: rovka, dberris, vkalintiris and 2 others. · View Herald TranscriptDec 2 2016, 5:35 AM Comment Actions Thanks. I've updated the patch
This revision is now accepted and ready to land.Dec 7 2016, 8:24 AM dsanders marked an inline comment as done. dsanders edited edge metadata. Comment ActionsMoved this patch to the new patch series. dsanders added a parent revision: D27978: [aarch64][globalisel] Move getValueMapping/getCopyMapping to AArch64GenRegisterBankInfo. NFC.. dsanders removed a parent revision: D27338: [globalisel] Tablegen-erate current Register Bank Information. dsanders removed a child revision: D27457: [globalisel] Tablegen-erate PartialMapping*/ValueMapping*/BankIDToCopyMapIdx.. dsanders added a parent revision: D27338: [globalisel] Tablegen-erate current Register Bank Information.Dec 20 2016, 3:38 AM dsanders removed a parent revision: D27338: [globalisel] Tablegen-erate current Register Bank Information.Dec 20 2016, 4:07 AM dsanders added a child revision: D27338: [globalisel] Tablegen-erate current Register Bank Information.Dec 20 2016, 4:09 AM Comment Actions Hi Daniel, I fail to see the goal of this patch. Cheers, Comment Actions
The aim is to generalize getCopyMapping() so it can support more than two register banks. This will be useful for targets that have special purpose register banks (e.g. the HI/LO registers used by MIPS's multiply and divide and DSP operations, also the co-processor registers), or separate address and data register banks. It should also be useful if AArch64 ever needs to move values between CCR and GPR banks. Later on, I would expect the underlying data tablegen-erated and for getCopyMapping() to be moved to target independent code. A less important reason (but the one that drew my attention), was that I didn't like the way CHECK_VALUEMAP_CROSSREGCPY() and getCopyMapping() together were converting PartialMappingIdx's to booleans and then back to PartialMappingIdx's and this also caused some problems with my original patch series (CCR needed to be excluded from the copy mapping table).
Revision Contents
Diff 83608 lib/Target/AArch64/AArch64GenRegisterBankInfo.def
lib/Target/AArch64/AArch64RegisterBankInfo.h
lib/Target/AArch64/AArch64RegisterBankInfo.cpp
|
Why is this last member needed? Isn't it invalid to access it in the first place?