This is an archive of the discontinued LLVM Phabricator instance.

[mips][microMIPS] Extending size reduction pass with ADDIUSP and ADDIUR1SP
ClosedPublic

Authored by milena.vujosevic.janicic on Jun 5 2017, 3:31 AM.

Details

Summary

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

Diff Detail

Repository
rL LLVM

Event Timeline

sdardis accepted this revision.Jun 5 2017, 5:28 AM

Can you re-upload this diff before committing? The paths are cut short, so they're missing test/ and lib/ respectively.

Otherwise, LGTM with some nits on the comments.

Target/Mips/MicroMipsSizeReduction.cpp
35 ↗(On Diff #101384)

Nit: "Transfer opernads no 0 and no 2" -> "Transfer operands 0 and 2"

36 ↗(On Diff #101384)

Nit; oppernad -> operand.

153 ↗(On Diff #101384)

Nit: full stop at the end of this sentence.

158 ↗(On Diff #101384)

Nit: full stop at the end of this sentence.

259 ↗(On Diff #101384)

Nit: "is ADDIUSP immediate" should be "is a valid immediate for ADDIUSP.".

This revision is now accepted and ready to land.Jun 5 2017, 5:28 AM
sdardis added inline comments.Jun 7 2017, 4:47 AM
lib/Target/Mips/MicroMipsSizeReduction.cpp
35–36 ↗(On Diff #101670)

opernad -> operand.

259 ↗(On Diff #101670)

Full stop at the end of this sentence.

This revision was automatically updated to reflect the committed changes.