ARM: add pseudo-instructions for lit-pool global materialisation
authorTim Northover <tnorthover@apple.com>
Mon, 2 Dec 2013 10:35:41 +0000 (10:35 +0000)
committerTim Northover <tnorthover@apple.com>
Mon, 2 Dec 2013 10:35:41 +0000 (10:35 +0000)
commitf715d5176953dde487969561f0140bd55bd5daf6
treebcef6dd9a7785f7dcc2103841e398973548ed597
parentee97bbfd5c192d64317828161ec7186e943a6463
ARM: add pseudo-instructions for lit-pool global materialisation

These are used by MachO only at the moment, and (much like the existing
MOVW/MOVT set) work around the fact that the labels used in the actual
instructions often contain PC-dependent components, which means that repeatedly
materialising the same global can't be CSEed.

With small modifications, it could be adapted to how ELF finds the address of
_GLOBAL_OFFSET_TABLE_, which would give similar benefits in PIC mode there.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196090 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMBaseInstrInfo.cpp
lib/Target/ARM/ARMExpandPseudoInsts.cpp
lib/Target/ARM/ARMISelDAGToDAG.cpp
lib/Target/ARM/ARMISelLowering.cpp
lib/Target/ARM/ARMInstrInfo.td
lib/Target/ARM/ARMInstrThumb.td
test/CodeGen/ARM/cse-ldrlit.ll [new file with mode: 0644]
test/CodeGen/ARM/indirectbr.ll
test/CodeGen/ARM/machine-licm.ll