OSDN Git Service

Materialize global addresses via movt/movw pair, this is always better
authorAnton Korobeynikov <asl@math.spbu.ru>
Tue, 24 Nov 2009 00:44:37 +0000 (00:44 +0000)
committerAnton Korobeynikov <asl@math.spbu.ru>
Tue, 24 Nov 2009 00:44:37 +0000 (00:44 +0000)
commit5cdc3a949af0cef7f2163f8a7acbf3049c226321
tree6cbd9b033b162075d09d6815be1c15f65f1bd468
parent6935efcb667bcd4dd3a00bbd420461e1fadba73a
Materialize global addresses via movt/movw pair, this is always better
than doing the same via constpool:
1. Load from constpool costs 3 cycles on A9, movt/movw pair - just 2.
2. Load from constpool might stall up to 300 cycles due to cache miss.
3. Movt/movw does not use load/store unit.
4. Less constpool entries => better compiler performance.

This is only enabled on ELF systems, since darwin does not have needed
relocations (yet).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@89720 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMBaseInstrInfo.h
lib/Target/ARM/ARMExpandPseudoInsts.cpp
lib/Target/ARM/ARMISelDAGToDAG.cpp
lib/Target/ARM/ARMISelLowering.cpp
lib/Target/ARM/ARMInstrInfo.td
lib/Target/ARM/ARMInstrThumb2.td
lib/Target/ARM/ARMSubtarget.cpp
lib/Target/ARM/ARMSubtarget.h
lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp
lib/Target/ARM/Thumb2SizeReduction.cpp
test/CodeGen/ARM/movt-movw-global.ll [new file with mode: 0644]