Go to file
Scott Douglass 953f908173 [ARM] Modify codegen for memcpy intrinsic to prefer LDM/STM.
We were previously codegen'ing memcpy 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 achieving better codegen is to create MEMCPY pseudo
instructions, attach scratch virtual registers to them and then, post register
allocation, expand the MEMCPYs into LDM/STM pairs using the scratch registers.
The register allocator will have picked arbitrary registers which we sort when
expanding the MEMCPY. This approach also avoids the need to repeatedly calculate
offsets which ultimately ought to be eliminated pre-RA in order to decrease
register pressure.

Fixes PR9199 and PR23768.

[This is based on Peter Collingbourne's r238473 which was reverted.]

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

Change-Id: I727543c2e94136e0f80b8e22d5642d7b9ee5b458
Author: Peter Collingbourne <peter@pcc.me.uk>
llvm-svn: 249322
2015-10-05 14:49:54 +00:00
clang Adding a narrowing AST matcher for FunctionDecl::isVariadic(), plus tests and documentation. 2015-10-05 14:41:27 +00:00
clang-tools-extra Use better mocks in modernize-make-unique, and fix matcher. 2015-10-05 12:20:17 +00:00
compiler-rt [asan][mips] Fix ABI incompatibility crash in pthread_create() following r248325. 2015-10-05 12:43:47 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc Implement tanh builtin 2015-09-29 06:39:09 +00:00
libcxx [libcxx] Use newest supported language dialect when running the test suite. 2015-10-03 02:32:23 +00:00
libcxxabi Let cxa_demangle.cpp compile with gcc/libstdc++ 4.8 and clang-cl/MSVC2013's STL. 2015-09-20 18:10:46 +00:00
libunwind unwind: Allow the building of libunwind for MIPS. 2015-09-26 18:26:01 +00:00
lld [ELF2] Add DT_INIT and DT_FINI dynamic table entries 2015-10-05 10:29:46 +00:00
lldb [LLDB][MIPS] Skip invalid size watchpoint testcase for MIPS 2015-10-05 10:56:19 +00:00
llgo [llgo] irgen: always use TargetMachine's data layout 2015-09-25 06:28:14 +00:00
llvm [ARM] Modify codegen for memcpy intrinsic to prefer LDM/STM. 2015-10-05 14:49:54 +00:00
openmp Fix memory corruption in Windows debug library 2015-09-25 17:23:17 +00:00
polly Remove non-executed statements during SCoP simplifcation 2015-10-04 15:00:05 +00:00