llvm-6502/lib/Transforms/Scalar
Chandler Carruth 9156c5e3ba Teach the load analysis to allow finding available values which require
inttoptr or ptrtoint cast provided there is datalayout available.
Eventually, the datalayout can just be required but in practice it will
always be there today.

To go with the ability to expose available values requiring a ptrtoint
or inttoptr cast, helpers are added to perform one of these three casts.

These smarts are necessary to finish canonicalizing loads and stores to
the operational type requirements without regressing fundamental
combines.

I've added some test cases. These should actually improve as the load
combining and store combining improves, but they may fundamentally be
highlighting some missing combines for select in addition to exercising
the specific added logic to load analysis.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220277 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-21 09:00:40 +00:00
..
ADCE.cpp [Modules] Fix potential ODR violations by sinking the DEBUG_TYPE 2014-04-22 02:55:47 +00:00
AlignmentFromAssumptions.cpp [AlignmentFromAssumptions] Don't crash just because the target is 32-bit 2014-09-11 08:40:17 +00:00
CMakeLists.txt Add an AlignmentFromAssumptions Pass 2014-09-07 20:05:11 +00:00
ConstantHoisting.cpp Remove unnecessary copying or replace it with moves in a bunch of places. 2014-10-04 16:55:56 +00:00
ConstantProp.cpp [C++] Use 'nullptr'. Transforms edition. 2014-04-25 05:29:35 +00:00
CorrelatedValuePropagation.cpp Make use of @llvm.assume from LazyValueInfo 2014-09-07 20:29:59 +00:00
DCE.cpp [Modules] Fix potential ODR violations by sinking the DEBUG_TYPE 2014-04-22 02:55:47 +00:00
DeadStoreElimination.cpp [DSE] Remove no-data-layout-only type-based overlap checking 2014-10-17 11:56:00 +00:00
EarlyCSE.cpp Using a deque to manage the stack of nodes is faster here. 2014-09-20 13:29:20 +00:00
FlattenCFGPass.cpp [Modules] Fix potential ODR violations by sinking the DEBUG_TYPE 2014-04-22 02:55:47 +00:00
GVN.cpp Make use of @llvm.assume in ValueTracking (computeKnownBits, etc.) 2014-09-07 18:57:58 +00:00
IndVarSimplify.cpp [BUG][INDVAR] Fix for PR21014: wrong SCEV operands commuting for non-commutative instructions 2014-10-02 13:01:15 +00:00
JumpThreading.cpp Teach the load analysis to allow finding available values which require 2014-10-21 09:00:40 +00:00
LICM.cpp Introduce enum values for previously defined metadata types. (NFC) 2014-10-21 00:13:20 +00:00
LLVMBuild.txt ScalarOpts/LLVMBuild.txt: Prune unused dependency to IPA. 2014-09-09 15:00:38 +00:00
LoadCombine.cpp Fixing a few -Woverloaded-virtual warnings by exposing the hidden virtual function as well. No functional changes intended. 2014-07-30 19:23:59 +00:00
LoopDeletion.cpp Use range based for loops to avoid needing to re-mention SmallPtrSet size. 2014-08-24 23:23:06 +00:00
LoopIdiomRecognize.cpp Remove extra whitespace in function declaration. No functionality change. 2014-06-14 03:48:29 +00:00
LoopInstSimplify.cpp Make use of @llvm.assume in ValueTracking (computeKnownBits, etc.) 2014-09-07 18:57:58 +00:00
LoopRerollPass.cpp Feeding isSafeToSpeculativelyExecute its DataLayout pointer 2014-07-10 14:41:31 +00:00
LoopRotation.cpp Make use of @llvm.assume in ValueTracking (computeKnownBits, etc.) 2014-09-07 18:57:58 +00:00
LoopStrengthReduce.cpp Use range based for loops to avoid needing to re-mention SmallPtrSet size. 2014-08-24 23:23:06 +00:00
LoopUnrollPass.cpp [SCEV] Add some asserts to the recently improved trip count computation 2014-10-11 00:12:11 +00:00
LoopUnswitch.cpp Add functions for finding ephemeral values 2014-09-07 13:49:57 +00:00
LowerAtomic.cpp IR: add "cmpxchg weak" variant to support permitted failure. 2014-06-13 14:24:07 +00:00
Makefile
MemCpyOptimizer.cpp Allow call-slop optzn for destinations with a suitable dereferenceable attribute 2014-10-16 19:43:08 +00:00
MergedLoadStoreMotion.cpp [MergedLoadStoreMotion] Move pass enabling option to PassManagerBuilder 2014-09-10 19:55:29 +00:00
PartiallyInlineLibCalls.cpp PartiallyInlineLibCalls: Check sqrt result type before transforming it. 2014-08-01 23:21:21 +00:00
Reassociate.cpp [Reassociate] Don't canonicalize X - undef to X + (-undef). 2014-10-09 20:06:29 +00:00
Reg2Mem.cpp [Modules] Fix potential ODR violations by sinking the DEBUG_TYPE 2014-04-22 02:55:47 +00:00
SampleProfile.cpp SampleProfile.cpp: Prune a stray \param added in r217437. [-Wdocumentation] 2014-09-09 22:44:30 +00:00
Scalar.cpp [C API] Make the 'lower switch' pass available via the C API. 2014-09-11 21:32:32 +00:00
Scalarizer.cpp Fixing the build failure due to compiler warnings and unnecessary disambiguation. 2014-10-15 23:11:35 +00:00
ScalarReplAggregates.cpp Move the complex address expression out of DIVariable and into an extra 2014-10-01 18:55:02 +00:00
SCCP.cpp Simplify creation of a bunch of ArrayRefs by using None, makeArrayRef or just letting them be implicitly created. 2014-08-27 05:25:25 +00:00
SeparateConstOffsetFromGEP.cpp Partially revert r210444 due to performance regression 2014-07-16 23:25:00 +00:00
SimplifyCFGPass.cpp [SimplifyCFG] threshold for folding branches with common destination 2014-09-30 22:23:38 +00:00
Sink.cpp Use range based for loops to avoid needing to re-mention SmallPtrSet size. 2014-08-24 23:23:06 +00:00
SROA.cpp [SROA] Change how SROA does vector-based promotion of allocas to handle 2014-10-18 00:44:02 +00:00
StructurizeCFG.cpp Revert "[C++11] Add predecessors(BasicBlock *) / successors(BasicBlock *) iterator ranges." 2014-07-21 17:06:51 +00:00
TailRecursionElimination.cpp Fix a long-standing miscompile in the load analysis that was uncovered 2014-10-19 08:17:50 +00:00