OSDN Git Service

Use literal pool loads instead of MOVW/MOVT for materializing global addresses when...
authorJames Molloy <james.molloy@arm.com>
Wed, 19 Oct 2011 14:11:07 +0000 (14:11 +0000)
committerJames Molloy <james.molloy@arm.com>
Wed, 19 Oct 2011 14:11:07 +0000 (14:11 +0000)
commitcdd8e46bec4e975d00a5abea808d8eb4138515c5
tree5feaecc08b9dae81374c129cfe5d28552a998c25
parent40230c4c06e0ad1afbef217229363cab077368b3
Use literal pool loads instead of MOVW/MOVT for materializing global addresses when optimizing for size.

On spec/gcc, this caused a codesize improvement of ~1.9% for ARM mode and ~4.9% for Thumb(2) mode. This is
codesize including literal pools.

The pools themselves doubled in size for ARM mode and quintupled for Thumb mode, leaving suggestion that there
is still perhaps redundancy in LLVM's use of constant pools that could be decreased by sharing entries.

Fixes PR11087.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142530 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMISelLowering.cpp
test/CodeGen/ARM/2011-10-18-DisableMovtSize.ll [new file with mode: 0644]