llvm-6502/lib
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 Add BranchProbabilityInfo::releaseMemory to clear the Weights field. 2015-05-28 19:43:06 +00:00
AsmParser Add initial support for the convergent attribute. 2015-05-26 23:48:40 +00:00
Bitcode [BitcodeReader] Change assert to report_fatal_error 2015-05-27 01:05:40 +00:00
CodeGen AsmPrinter: Stop exposing underlying DIE children list, NFC 2015-05-28 19:56:34 +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
Fuzzer [lib/Fuzzer] make the fuzzing timeout 1200 seconds by default (was: infinity) 2015-05-26 20:57:47 +00:00
IR Add initial support for the convergent attribute. 2015-05-26 23:48:40 +00:00
IRReader Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects. 2015-02-11 03:28:02 +00:00
LineEditor Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects. 2015-02-11 03:28:02 +00:00
Linker While in GlobalValue fix the function(s) that don't follow the 2015-05-15 18:20:14 +00:00
LTO LTO: Add API to choose whether to embed uselists 2015-04-27 23:38:54 +00:00
MC Merge redundant loops. NFC. 2015-05-28 20:00:13 +00:00
Object Object: Add Archive::getNumberOfSymbols(). 2015-05-26 16:20:40 +00:00
Option Option parsing: properly handle flag aliases for joined options (PR23394) 2015-05-04 18:00:13 +00:00
Passes [PM] Fixup for r231556 where I missed a dependency on intrinsics 2015-03-07 09:08:20 +00:00
ProfileData InstrProf: Treat functions with a coverage map but no profile as unreached 2015-05-13 22:03:04 +00:00
Support [ARMTargetParser] Adding sub-arch information for Clang. NFC 2015-05-28 15:05:18 +00:00
TableGen Don't call utostr in Twine/raw_ostream contexts. 2015-05-28 11:24:24 +00:00
Target Thumb2: Modify codegen for memcpy intrinsic to prefer LDM/STM. 2015-05-28 20:02:45 +00:00
Transforms [InstCombine] Fold IntToPtr and PtrToInt into preceding loads. 2015-05-28 18:39:17 +00:00
CMakeLists.txt [PM] Create a separate library for high-level pass management code. 2015-03-07 09:02:36 +00:00
LLVMBuild.txt Reflow long lines of some LLVMBuild files 2015-05-14 15:38:27 +00:00
Makefile [PM] Create a separate library for high-level pass management code. 2015-03-07 09:02:36 +00:00