llvm-project/llvm/test/CodeGen
James Molloy fe7fd879d7 [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).

This recommit contains fixes for a nasty bug related to fast-isel fallback - because
fast-isel doesn't know about this optimization, if it runs and emits references to
a string that we inline (because fast-isel fell back to SDAG) we will end up
with an inlined string and also an out-of-line string, and we won't emit the
out-of-line string, causing backend failures.

llvm-svn: 281604
2016-09-15 12:30:27 +00:00
..
AArch64 GlobalISel: legalize GEP instructions with small offsets. 2016-09-15 11:02:19 +00:00
AMDGPU Revert "AMDGPU: Use SOPK compare instructions" 2016-09-14 18:04:42 +00:00
ARM [ARM] Promote small global constants to constant pools 2016-09-15 12:30:27 +00:00
BPF
Generic CodeGen: Remove MachineFunctionAnalysis => Enable (Machine)ModulePasses 2016-08-24 01:52:46 +00:00
Hexagon This reapplies r281304. The issue was that I had missed 2016-09-14 08:20:03 +00:00
Inputs
Lanai Add a REQUIRES: assert on a Lanai test that uses a -debug-only flag 2016-07-29 19:35:22 +00:00
MIR [AArch64] Simplify patchpoint/stackmap size test (r281301). NFC. 2016-09-13 22:16:40 +00:00
MSP430 Revert r279242 - it's failing the tests 2016-08-19 14:18:34 +00:00
Mips Revert "[mips] Fix c.<cc>.<fmt> instruction definition." 2016-09-09 11:06:01 +00:00
NVPTX DebugInfo: New metadata representation for global variables. 2016-09-13 01:12:59 +00:00
PowerPC [Stackmap] Added callsite counts to emitted function information. 2016-09-14 20:22:03 +00:00
SPARC [Myriad]: set LeonCASA processor feature 2016-09-13 17:51:41 +00:00
SystemZ [SystemZ] Use valid base/index regs for inline asm 2016-08-18 21:44:15 +00:00
Thumb Revert "[Thumb] Teach ISel how to lower compares of AND bitmasks efficiently" 2016-09-14 09:45:28 +00:00
Thumb2 Revert "[Thumb] Teach ISel how to lower compares of AND bitmasks efficiently" 2016-09-14 09:45:28 +00:00
WebAssembly [WebAssembly] Trying to fix broken tests in CodeGen/WebAssembly caused by r281285. 2016-09-13 10:05:44 +00:00
WinEH Revert EH-specific checks in BranchFolding that were causing blow ups in compile time. 2016-07-27 17:55:33 +00:00
X86 [Stackmap] Added callsite counts to emitted function information. 2016-09-14 20:22:03 +00:00
XCore IR: Introduce Module::global_objects(). 2016-06-22 20:29:42 +00:00