[SystemZ] Fold more spills
authorRichard Sandiford <rsandifo@linux.vnet.ibm.com>
Wed, 3 Jul 2013 10:10:02 +0000 (10:10 +0000)
committerRichard Sandiford <rsandifo@linux.vnet.ibm.com>
Wed, 3 Jul 2013 10:10:02 +0000 (10:10 +0000)
commited1fab6b5bfb54d63102319a761011e985081cb4
tree6f875f92916f0dc214d1f28035000331faccbac7
parentd36cbaa4231e51a42d761d298ff20aaa6e88d014
[SystemZ] Fold more spills

Add a mapping from register-based <INSN>R instructions to the corresponding
memory-based <INSN>.  Use it to cut down on the number of spill loads.

Some instructions extend their operands from smaller fields, so this
required a new TSFlags field to say how big the unextended operand is.

This optimisation doesn't trigger for C(G)R and CL(G)R because in practice
we always combine those instructions with a branch.  Adding a test for every
other case probably seems excessive, but it did catch a missed optimisation
for DSGF (fixed in r185435).

llvm-svn: 185529
60 files changed:
llvm/lib/Target/SystemZ/SystemZInstrFP.td
llvm/lib/Target/SystemZ/SystemZInstrFormats.td
llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp
llvm/lib/Target/SystemZ/SystemZInstrInfo.h
llvm/lib/Target/SystemZ/SystemZInstrInfo.td
llvm/test/CodeGen/SystemZ/and-01.ll
llvm/test/CodeGen/SystemZ/and-03.ll
llvm/test/CodeGen/SystemZ/bswap-02.ll
llvm/test/CodeGen/SystemZ/bswap-03.ll
llvm/test/CodeGen/SystemZ/fp-add-01.ll
llvm/test/CodeGen/SystemZ/fp-add-02.ll
llvm/test/CodeGen/SystemZ/fp-cmp-01.ll
llvm/test/CodeGen/SystemZ/fp-cmp-02.ll
llvm/test/CodeGen/SystemZ/fp-conv-02.ll
llvm/test/CodeGen/SystemZ/fp-conv-03.ll
llvm/test/CodeGen/SystemZ/fp-conv-04.ll
llvm/test/CodeGen/SystemZ/fp-div-01.ll
llvm/test/CodeGen/SystemZ/fp-div-02.ll
llvm/test/CodeGen/SystemZ/fp-mul-01.ll
llvm/test/CodeGen/SystemZ/fp-mul-02.ll
llvm/test/CodeGen/SystemZ/fp-mul-03.ll
llvm/test/CodeGen/SystemZ/fp-mul-04.ll
llvm/test/CodeGen/SystemZ/fp-sqrt-01.ll
llvm/test/CodeGen/SystemZ/fp-sqrt-02.ll
llvm/test/CodeGen/SystemZ/fp-sub-01.ll
llvm/test/CodeGen/SystemZ/fp-sub-02.ll
llvm/test/CodeGen/SystemZ/int-add-02.ll
llvm/test/CodeGen/SystemZ/int-add-03.ll
llvm/test/CodeGen/SystemZ/int-add-04.ll
llvm/test/CodeGen/SystemZ/int-add-05.ll
llvm/test/CodeGen/SystemZ/int-add-08.ll
llvm/test/CodeGen/SystemZ/int-cmp-05.ll
llvm/test/CodeGen/SystemZ/int-cmp-06.ll
llvm/test/CodeGen/SystemZ/int-conv-01.ll
llvm/test/CodeGen/SystemZ/int-conv-02.ll
llvm/test/CodeGen/SystemZ/int-conv-03.ll
llvm/test/CodeGen/SystemZ/int-conv-04.ll
llvm/test/CodeGen/SystemZ/int-conv-05.ll
llvm/test/CodeGen/SystemZ/int-conv-06.ll
llvm/test/CodeGen/SystemZ/int-conv-07.ll
llvm/test/CodeGen/SystemZ/int-conv-08.ll
llvm/test/CodeGen/SystemZ/int-conv-09.ll
llvm/test/CodeGen/SystemZ/int-conv-10.ll
llvm/test/CodeGen/SystemZ/int-div-01.ll
llvm/test/CodeGen/SystemZ/int-div-02.ll
llvm/test/CodeGen/SystemZ/int-div-04.ll
llvm/test/CodeGen/SystemZ/int-div-05.ll
llvm/test/CodeGen/SystemZ/int-mul-02.ll
llvm/test/CodeGen/SystemZ/int-mul-03.ll
llvm/test/CodeGen/SystemZ/int-mul-04.ll
llvm/test/CodeGen/SystemZ/int-mul-08.ll
llvm/test/CodeGen/SystemZ/int-sub-01.ll
llvm/test/CodeGen/SystemZ/int-sub-02.ll
llvm/test/CodeGen/SystemZ/int-sub-03.ll
llvm/test/CodeGen/SystemZ/int-sub-04.ll
llvm/test/CodeGen/SystemZ/int-sub-05.ll
llvm/test/CodeGen/SystemZ/or-01.ll
llvm/test/CodeGen/SystemZ/or-03.ll
llvm/test/CodeGen/SystemZ/xor-01.ll
llvm/test/CodeGen/SystemZ/xor-03.ll