- Similiar to the ARM backend yse the peephole optimizer to generate more conditional ALU operations;
- Add predicated type with default always true to RR instructions in LanaiInstrInfo.td;
- Move LanaiSetflagAluCombiner into optimizeCompare;
- The ASM parser can currently only handle explicitly specified CC, so specify ".t" (true) where needed in the ASM test;
- Remove unused MachineOperand flags;
Details
Diff Detail
Event Timeline
Since most of the actual peephole code is taken from the ARM backend, I left less comments on that part.
lib/Target/Lanai/AsmParser/LanaiAsmParser.cpp | ||
---|---|---|
368 | A comment here could be helpful to explain why < UNKNOWN makes isCondCode true | |
1053–1062 | Here too, a comment could help explain the logic | |
lib/Target/Lanai/LanaiISelLowering.cpp | ||
1293 | Can you clarify what the AllOnes arg does? And it's not very clear about Invert, I'd add more details (or example) | |
1321 | I feel this could be clearer as separate cases without the fall through, because in case ISD::SIGN_EXTEND we know !AllOnes and we know the opcode so many of the conditions become trivial ... not a strong feeling about it - you can try to rewrite it the other way and see if it looks cleaner to you | |
lib/Target/Lanai/LanaiInstrInfo.h | ||
91 | Can you document these methods? Their arguments, etc. [even if this mirrors the ARM backend it's nice to have all clear here for Lanai] |
A comment here could be helpful to explain why < UNKNOWN makes isCondCode true