hanchenye-llvm-project/llvm
Chandler Carruth 58d0556765 Teach SROA how to split whole-alloca integer loads and stores into
smaller integer loads and stores.

The high-level motivation is that the frontend sometimes generates
a single whole-alloca integer load or store during ABI lowering of
splittable allocas. We need to be able to break this apart in order to
see the underlying elements and properly promote them to SSA values. The
hope is that this fixes some performance regressions on x86-32 with the
new SROA pass.

Unfortunately, this causes quite a bit of churn in the test cases, and
bloats some IR that comes out. When we see an alloca that consists soley
of bits and bytes being extracted and re-inserted, we now do some
splitting first, before building widened integer "bucket of bits"
representations. These are always well folded by instcombine however, so
this shouldn't actually result in missed opportunities.

If this splitting of all-integer allocas does cause problems (perhaps
due to smaller SSA values going into the RA), we could potentially go to
some extreme measures to only do this integer splitting trick when there
are non-integer component accesses of an alloca, but discovering this is
quite expensive: it adds yet another complete walk of the recursive use
tree of the alloca.

Either way, I will be watching build bots and LNT bots to see what
fallout there is here. If anyone gets x86-32 numbers before & after this
change, I would be very interested.

llvm-svn: 166662
2012-10-25 04:37:07 +00:00
..
autoconf Re-enable support for --program-prefix. 2012-10-01 18:40:32 +00:00
bindings Fix a build error for ocaml bindings that was introduced with the TargetData --> DataLayout changes. 2012-10-19 20:36:22 +00:00
cmake CMake: Include private headers / tablegen files in generated Xcode projects. 2012-10-23 21:36:55 +00:00
docs Add a bit of documentation on the annotated disassembly output. 2012-10-24 23:30:22 +00:00
examples Back out r166591, not sure why this made it through since I cancelled the command. Bleh, sorry about this! 2012-10-24 17:25:11 +00:00
include Implement a basic cost model for vector and scalar instructions. 2012-10-24 23:47:38 +00:00
lib Teach SROA how to split whole-alloca integer loads and stores into 2012-10-25 04:37:07 +00:00
projects [CMake] Introduce LLVM_EXTERNAL_COMPILER_RT_SOURCE_DIR. 2012-10-24 12:26:08 +00:00
runtime Place temporary LTO files into their own subdirectory. 2012-10-10 05:29:15 +00:00
test Teach SROA how to split whole-alloca integer loads and stores into 2012-10-25 04:37:07 +00:00
tools Opt does not need to initialize the Asm printer/parser 2012-10-24 17:55:53 +00:00
unittests Fixed bug in SmallDenseMap where it wouldn't leave enough space for an empty bucket if the number of values was exactly equal to the small capacity. This led to an infinite loop when finding a non-existent element 2012-10-23 18:47:35 +00:00
utils Don't use stack unwinding to provide the location information for 2012-10-24 22:03:59 +00:00
.gitignore Add extra vim swap file pattern 2012-10-09 23:48:34 +00:00
CMakeLists.txt Removing dependency on third party library for Intel JIT event support. 2012-09-28 17:35:20 +00:00
CODE_OWNERS.TXT Add the list of code owners to the top level of the LLVM source tree to 2012-07-26 08:04:09 +00:00
CREDITS.TXT Move TargetData to DataLayout. 2012-10-08 16:40:38 +00:00
LICENSE.TXT
LLVMBuild.txt
Makefile Don't try to install c-index-test with BUILD_CLANG_ONLY. rdar://12492703 2012-10-24 22:56:32 +00:00
Makefile.common [docs] Remove unsupported references to ExtraSource variable. 2012-05-15 21:32:27 +00:00
Makefile.config.in Re-enable support for --program-prefix. 2012-10-01 18:40:32 +00:00
Makefile.rules Use MACOSX_DEPLOYMENT_TARGET when it is set. <rdar://problem/12433905> 2012-10-12 21:48:14 +00:00
README.txt test commit 2012-07-11 17:34:12 +00:00
configure Re-enable support for --program-prefix. 2012-10-01 18:40:32 +00:00
llvm.spec.in

README.txt

Low Level Virtual Machine (LLVM)
================================

This directory and its subdirectories contain source code for the Low Level
Virtual Machine, a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the HTML documentation provided in docs/index.html for further
assistance with LLVM.

If you're writing a package for LLVM, see docs/Packaging.html for our
suggestions.