Moves encoding (SYSm) information of banked registers to ARMSystemRegister.td, where it rightly belongs and forms a single point of reference in the code.
Details
Diff Detail
Event Timeline
LGTM, looks like a straight-forward improvement. I just have 2 nits. Please hold off with committing for a bit, so other people have time to voice concerns.
lib/Target/ARM/AsmParser/ARMAsmParser.cpp | ||
---|---|---|
4177–4178 | Should this comment be moved to lib/Target/ARM/ARMSystemRegister.td too? | |
lib/Target/ARM/Utils/ARMBaseInfo.cpp | ||
45 | not sure what the correct indentation for macros is, but this seems slightly inconsistent with lib/Target/ARM/Utils/ARMBaseInfo.h:69, where it was aligned with the code. |
lib/Target/ARM/Utils/ARMBaseInfo.cpp | ||
---|---|---|
45 | It's consistent with the indentation above, for GET_MYCLASSSYSTREG_IMPL, so if you change one you should change both. |
lib/Target/ARM/AsmParser/ARMAsmParser.cpp | ||
---|---|---|
4177–4178 | Yes. That should be. Thanks for catching it. | |
lib/Target/ARM/Utils/ARMBaseInfo.cpp | ||
45 | I too was confused with what the right indentation should be. |
We also have the reverse mapping (encoding->name) in ARMInstPrinter::printBankedRegOperand, could that use this table too?
In this update-
- Removed the manual (name->Encoding) in ARMISelDAGToDAG. Had missed it out earlier.
- Moved the comment to ARMSystemRegister.td
- Fixed indentation of "namespace namespace " . I too think no indentation on namespace is right choice (as Diana also mentioned).
I will attempt to clean this in a separate patch as the existing handling seems bit messy/tricky.
Thanks, I'm happy with the indentation and lib/Target/ARM/ARMISelDAGToDAG.cpp was a good spot.
Should this comment be moved to lib/Target/ARM/ARMSystemRegister.td too?