ARM: use litpools for normal i32 imms when compiling minsize.
authorTim Northover <tnorthover@apple.com>
Thu, 23 Jan 2014 13:43:47 +0000 (13:43 +0000)
committerTim Northover <tnorthover@apple.com>
Thu, 23 Jan 2014 13:43:47 +0000 (13:43 +0000)
commit1334acd8c6472725e3f23701957999236a1c5c72
treed0b137645612c4e40a2ca08d3e171de28ef76bf5
parent37106321f837d44954d7ed7b87e63ddfb68bf5a2
ARM: use litpools for normal i32 imms when compiling minsize.

With constant-sharing, litpool loads consume 4 + N*2 bytes of code, but
movw/movt pairs consume 8*N. This means litpools are better than movw/movt even
with just one use. Other materialisation strategies can still be better though,
so the logic is a little odd.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199891 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMISelDAGToDAG.cpp
lib/Target/ARM/ARMInstrInfo.td
lib/Target/ARM/ARMInstrThumb2.td
test/CodeGen/ARM/minsize-imms.ll [new file with mode: 0644]