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).
Would it also be worth doing this for very small constants with multiple uses? If the constant is no larger than a pointer then this won't increase code size, and should help performance by removing a layer of indirection.