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

Milena Vujosevic Janicic via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 2 02:52:14 PST 2015


milena.vujosevic.janicic created this revision.
milena.vujosevic.janicic added reviewers: dsanders, zoran.jovanovic.
milena.vujosevic.janicic added subscribers: llvm-commits, petarj.
Herald added a subscriber: dsanders.

The code implements size reduction pass for MicroMIPS. 

Load and store instructions are examined and transformed, if possible.
1) Several lw/sw instructions are transformed into lwm16/swm16 instruction or into lwm32/swm32. 
These instructions do not have to be in straight-forward order, the order of instructions can also be backward or mixed
2) Two lw32/sw32 instructions are transformed into lwp/swp instruction
These two instructions can be in forward or backward order, and there can also be some instructions between them 
3) One lw32/sw32 instruction is transformed into 16-bit instructions lwsp, swsp or sw16


http://reviews.llvm.org/D15144

Files:
  lib/Target/Mips/MicroMips32SizeReduction.cpp
  lib/Target/Mips/MicroMipsInstrInfo.td
  lib/Target/Mips/Mips.h
  lib/Target/Mips/MipsTargetMachine.cpp
  test/CodeGen/Mips/micromips-lwm-swm-lwp-swp-sw16.ll
  test/CodeGen/Mips/micromips-lwsp-swsp.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D15144.41603.patch
Type: text/x-patch
Size: 44612 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151202/c99fd5ec/attachment-0001.bin>


More information about the llvm-commits mailing list