llvm-6502/lib/Transforms/Scalar
Chandler Carruth a2b88163af 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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166662 91177308-0d34-0410-b5e6-96231b3b80d8
2012-10-25 04:37:07 +00:00
..
ADCE.cpp Clean whitespaces. 2012-07-24 10:51:42 +00:00
BasicBlockPlacement.cpp Get rid of static constructors for pass registration. Instead, every pass exposes an initializeMyPassFunction(), which 2010-10-19 17:21:58 +00:00
CMakeLists.txt Introduce a new SROA implementation. 2012-09-14 09:22:59 +00:00
CodeGenPrepare.cpp Add in support for getIntPtrType to get the pointer type based on the address space. 2012-10-24 15:52:52 +00:00
ConstantProp.cpp Move TargetData to DataLayout. 2012-10-08 16:38:25 +00:00
CorrelatedValuePropagation.cpp CorrelatedPropagation: BasicBlock::removePredecessor can simplify PHI nodes. If the it's the condition of a SwitchInst, reload it. 2012-09-28 10:42:50 +00:00
DCE.cpp 80-col fixup. 2012-10-16 19:39:40 +00:00
DeadStoreElimination.cpp Unquadratize SetVector removal loops in DSE. 2012-10-14 10:21:31 +00:00
EarlyCSE.cpp Update EarlyCSE's SimpleValues to use Hashing.h for their hashes. Expanded the hashing and equality to allow for equality modulo commutativity for binary ops, and comparisons with swapping of predicates. 2012-10-09 16:57:38 +00:00
GlobalMerge.cpp Move TargetData to DataLayout. 2012-10-08 16:38:25 +00:00
GVN.cpp Update GVN to support vectors of pointers. 2012-10-24 21:22:30 +00:00
IndVarSimplify.cpp Add in support for getIntPtrType to get the pointer type based on the address space. 2012-10-24 15:52:52 +00:00
JumpThreading.cpp Move TargetData to DataLayout. 2012-10-08 16:38:25 +00:00
LICM.cpp Move TargetData to DataLayout. 2012-10-08 16:38:25 +00:00
LLVMBuild.txt LLVMBuild: Remove trailing newline, which irked me. 2011-12-12 19:48:00 +00:00
LoopDeletion.cpp Clean whitespaces. 2012-07-24 10:51:42 +00:00
LoopIdiomRecognize.cpp Add in support for getIntPtrType to get the pointer type based on the address space. 2012-10-24 15:52:52 +00:00
LoopInstSimplify.cpp Move TargetData to DataLayout. 2012-10-08 16:38:25 +00:00
LoopRotation.cpp LoopRotation: Make the brute force DomTree update more brute force. 2012-09-02 11:57:22 +00:00
LoopStrengthReduce.cpp revert r166264 because the LTO build is still failing 2012-10-19 21:28:43 +00:00
LoopUnrollPass.cpp Create enums for the different attributes. 2012-10-09 07:45:08 +00:00
LoopUnswitch.cpp Simplify code. No functionality change. 2012-10-16 19:52:32 +00:00
LowerAtomic.cpp Clean whitespaces. 2012-07-24 10:51:42 +00:00
Makefile
MemCpyOptimizer.cpp Resubmit the changes to llvm core to update the functions to support different pointer sizes on a per address space basis. 2012-10-15 16:24:29 +00:00
ObjCARC.cpp Use the Attributes::get method which takes an AttrVal value directly to simplify the code a bit. No functionality change. 2012-10-16 05:23:31 +00:00
Reassociate.cpp Stop reassociate from looking through expressions of arbitrary complexity. This 2012-07-26 09:26:40 +00:00
Reg2Mem.cpp Clean whitespaces. 2012-07-24 10:51:42 +00:00
Scalar.cpp Move TargetData to DataLayout. 2012-10-08 16:38:25 +00:00
ScalarReplAggregates.cpp Add in support for getIntPtrType to get the pointer type based on the address space. 2012-10-24 15:52:52 +00:00
SCCP.cpp Move TargetData to DataLayout. 2012-10-08 16:38:25 +00:00
SimplifyCFGPass.cpp Move TargetData to DataLayout. 2012-10-08 16:38:25 +00:00
SimplifyLibCalls.cpp Add in support for getIntPtrType to get the pointer type based on the address space. 2012-10-24 15:52:52 +00:00
Sink.cpp Clean whitespaces. 2012-07-24 10:51:42 +00:00
SROA.cpp Teach SROA how to split whole-alloca integer loads and stores into 2012-10-25 04:37:07 +00:00
TailRecursionElimination.cpp Revert r166407 because it caused analyzer tests to crash and broke self-host bots. 2012-10-22 18:16:14 +00:00