The patch extends size reduction pass for MicroMIPS.
The following instructions are examined and transformed, if possible:
ADDIU instruction is transformed into 16-bit instruction ADDIUSP
ADDIU instruction is transformed into 16-bit instruction ADDIUR1SP
Function InRange is changed to avoid left shifting of negative values, since
that caused some sanitizer tests to fail (so the previous patch
https://reviews.llvm.org/D33887 was reverted).
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Target/Mips/MicroMipsSizeReduction.cpp | ||
---|---|---|
426 ↗ | (On Diff #103564) | This is common between the two branches of the if, so it can be hoisted above the if. |
429 ↗ | (On Diff #103564) | This is common too, so it should be hoisted up. |
462–463 ↗ | (On Diff #103564) | Formatting: Break overly long conditional statements _after_ the '||' or '&&' operators, not before. i.e. This should be: if (!Subtarget->inMicroMipsMode() || !Subtarget->hasMips32r2() || Subtarget->hasMips32r6()) clang-format handles this. |
Comment Actions
LGTM with nit addressed.
lib/Target/Mips/MicroMipsSizeReduction.cpp | ||
---|---|---|
443 ↗ | (On Diff #104366) | Needs: } else llvm_unreachable("Unknown operand transfer!"); |