llvm-6502/test
Peter Collingbourne 27565d6185 Thumb2: Modify codegen for memcpy intrinsic to prefer LDM/STM.
We were previously codegen'ing these as regular load/store operations and
hoping that the register allocator would allocate registers in ascending order
so that we could apply an LDM/STM combine after register allocation. According
to the commit that first introduced this code (r37179), we planned to teach
the register allocator to allocate the registers in ascending order. This
never got implemented, and up to now we've been stuck with very poor codegen.

A much simpler approach for achiveing better codegen is to create LDM/STM
instructions with identical sets of virtual registers, let the register
allocator pick arbitrary registers and order register lists when printing an
MCInst. This approach also avoids the need to repeatedly calculate offsets
which ultimately ought to be eliminated pre-RA in order to decrease register
pressure.

This is implemented by lowering the memcpy intrinsic to a series of SD-only
MCOPY pseudo-instructions which performs a memory copy using a given number
of registers. During SD->MI lowering, we lower MCOPY to LDM/STM. This is a
little unusual, but it avoids the need to encode register lists in the SD,
and we can take advantage of SD use lists to decide whether to use the _UPD
variant of the instructions.

Fixes PR9199.

Differential Revision: http://reviews.llvm.org/D9508

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@238473 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-28 20:02:45 +00:00
..
Analysis Revert r236894 "[BasicAA] Fix zext & sext handling" 2015-05-22 01:27:37 +00:00
Assembler IR / debug info: Add a DWOId field to DICompileUnit, 2015-05-21 20:37:30 +00:00
Bindings
Bitcode [BitcodeReader] Change assert to report_fatal_error 2015-05-27 01:05:40 +00:00
BugPoint
CodeGen Thumb2: Modify codegen for memcpy intrinsic to prefer LDM/STM. 2015-05-28 20:02:45 +00:00
DebugInfo DebugInfo: .debug_line DWARF64 support 2015-05-28 15:38:17 +00:00
ExecutionEngine [Mips64] Add support for MCJIT for MIPS64r2 and MIPS64r6 2015-05-28 13:48:41 +00:00
Feature
FileCheck
Instrumentation [ASan] New approach to dynamic allocas unpoisoning. Patch by Max Ostapenko! 2015-05-28 07:51:49 +00:00
Integer
JitListener
Linker
LTO
MC [mips] Add new format for dmtc2/dmfc2 for Octeon CPUs. 2015-05-28 16:23:16 +00:00
Object Stop inventing symbol sizes. 2015-05-22 15:43:00 +00:00
Other
SymbolRewriter
TableGen Use std::bitset for SubtargetFeatures. 2015-05-26 10:47:10 +00:00
tools [llvm-readobj/ELF] Teach how to decode DF_1_XXX flags 2015-05-25 19:12:18 +00:00
Transforms [InstCombine] Fold IntToPtr and PtrToInt into preceding loads. 2015-05-28 18:39:17 +00:00
Unit
Verifier [Verifier] Assert gc_relocate always return a pointer type 2015-05-18 19:50:14 +00:00
YAMLParser YAML: Implement block scalar parsing. 2015-05-13 23:10:51 +00:00
.clang-format
CMakeLists.txt
lit.cfg
lit.site.cfg.in
Makefile
Makefile.tests
TestRunner.sh