summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.h
diff options
context:
space:
mode:
authorJames Molloy <james.molloy@arm.com>2016-09-14 14:47:27 +0000
committerJames Molloy <james.molloy@arm.com>2016-09-14 14:47:27 +0000
commit13065b00ba3411d36e7bfbedd4858dc7f6db6e3a (patch)
treefc3bdfc1f842fd5f1345027e197b9166e4a1f08c /clang/lib/CodeGen/CodeGenModule.h
parentd3b2321f78974063f2ca01e91725496f29a36918 (diff)
downloadbcm5719-llvm-13065b00ba3411d36e7bfbedd4858dc7f6db6e3a.tar.gz
bcm5719-llvm-13065b00ba3411d36e7bfbedd4858dc7f6db6e3a.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: 281484
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud