[PATCH] D15144: [mips[microMIPS]] Adding code size reduction pass for MicroMIPS

Milena Vujosevic Janicic via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 24 06:39:39 PST 2016


milena.vujosevic.janicic updated this revision to Diff 79229.
milena.vujosevic.janicic added a comment.
Herald added a subscriber: mgorny.

All the comments from the previous revision are taken into account. 
lw16/sw16 support was excluded because it is not necessary in this moment.

The code implements size reduction pass for MicroMIPS.
Load and store instructions are examined and transformed, if possible.

  lw32 instruction is transformed into 16-bit instruction lwsp
  sw32 instruction is transformed into 16-bit instruction swsp

Arithmetic instrcutions are examined and transformed, if possible.

  addu32 instruction is transformed into 16-bit instruction addu16
  subu32 instruction is transformed into 16-bit instruction subu16


https://reviews.llvm.org/D15144

Files:
  lib/Target/Mips/CMakeLists.txt
  lib/Target/Mips/MicroMipsSizeReduction.cpp
  lib/Target/Mips/Mips.h
  lib/Target/Mips/MipsTargetMachine.cpp
  test/CodeGen/Mips/llvm-ir/add.ll
  test/CodeGen/Mips/llvm-ir/sub.ll
  test/CodeGen/Mips/micromips-sizereduction/micromips-lwsp-swsp.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15144.79229.patch
Type: text/x-patch
Size: 18367 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161124/9c799455/attachment.bin>


More information about the llvm-commits mailing list