summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/InstCombine/InstCombineInternal.h
diff options
context:
space:
mode:
authorJames Molloy <james.molloy@arm.com>2016-09-12 13:42:16 +0000
committerJames Molloy <james.molloy@arm.com>2016-09-12 13:42:16 +0000
commit8f82d45ff418f460baa4f7dd38374f7adb690805 (patch)
treea7f2e2290874dac42bae262f7c15925ba2d36564 /llvm/lib/Transforms/InstCombine/InstCombineInternal.h
parenta4c424654e658c7e582dbb91f09ad7ce24d8d8ef (diff)
downloadbcm5719-llvm-8f82d45ff418f460baa4f7dd38374f7adb690805.tar.gz
bcm5719-llvm-8f82d45ff418f460baa4f7dd38374f7adb690805.zip
[ARM] Promote small global constants to constant pools
If a constant is unamed_addr and is only used within one function, we can save on the code size and runtime cost of an indirection by changing the global's storage to inside the constant pool. For example, instead of: ldr r0, .CPI0 bl printf bx lr .CPI0: &format_string format_string: .asciz "hello, world!\n" We can emit: adr r0, .CPI0 bl printf bx lr .CPI0: .asciz "hello, world!\n" This can cause significant code size savings when many small strings are used in one function (4 bytes per string). llvm-svn: 281213
Diffstat (limited to 'llvm/lib/Transforms/InstCombine/InstCombineInternal.h')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud