The patch extends size reduction pass for MicroMIPS.
XOR instruction is transformed into 16-bit instruction XOR16, if possible.
Details
Diff Detail
Event Timeline
LGTM with inline comments addressed.
lib/Target/Mips/MicroMipsSizeReduction.cpp | ||
---|---|---|
460–475 | Change this if..else chain to switch on OpTransfer, with a default case of llvm_unreachable. | |
496 | There's a small 'gotcha' here, if Subtarget->hasMips64r6() is true, Subtarget->hasMips32r6() is also true. So "|| Subtarget->hasMips64r6()" can be removed. hasMips64(rX)() implies hasMips32(rX)() is also true, due to the way the architecture is defined, so generally you only need to check for the availability of the 32bit revision of the ISA to determine what revision is being targeted. |
Change this if..else chain to switch on OpTransfer, with a default case of llvm_unreachable.