llvm-6502/lib/Transforms/Scalar
Chandler Carruth 36ae8103b1 [Unrolling] Refactor the start and step offsets to simplify overflow
checking and make the cache faster and smaller.

I had thought that using an APInt here would be useful, but I think
I was just wrong. Notably, we don't have to do any fancy overflow
checking, we can just bound the values as quite small and do the math in
a higher precision integer. I've switched to a signed integer so that
UBSan will even point out if we ever have integer overflow. I've added
various asserts to try to catch things as well and hoisted the overflow
checks so that we just leave the too-large offsets out of the SCEV-GEP
cache. This makes the value in the cache quite a bit smaller which is
probably worthwhile.

No functionality changed here (for trip counts under 1 billion).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237209 91177308-0d34-0410-b5e6-96231b3b80d8
2015-05-12 23:32:56 +00:00
..
ADCE.cpp
AlignmentFromAssumptions.cpp Use 'override/final' instead of 'virtual' for overridden methods 2015-04-11 02:11:45 +00:00
BDCE.cpp
CMakeLists.txt Simplify n-ary adds by reassociation 2015-04-14 04:59:22 +00:00
ConstantHoisting.cpp Re-sort includes with sort-includes.py and insert raw_ostream.h where it's used. 2015-03-23 19:32:43 +00:00
ConstantProp.cpp
CorrelatedValuePropagation.cpp CVP: Improve handling of Selects used as incoming PHI values 2015-05-12 22:31:47 +00:00
DCE.cpp
DeadStoreElimination.cpp [CallSite] Make construction from Value* (or Instruction*) explicit. 2015-04-10 14:50:08 +00:00
EarlyCSE.cpp Re-sort includes with sort-includes.py and insert raw_ostream.h where it's used. 2015-03-23 19:32:43 +00:00
FlattenCFGPass.cpp
Float2Int.cpp Reapply r233175 and r233183: float2int. 2015-03-27 10:36:57 +00:00
GVN.cpp [opaque pointer type] API migration for GEP constant factories 2015-04-02 18:55:32 +00:00
InductiveRangeCheckElimination.cpp [IRCE] Fix how IRCE checks for no-sign-overflow. 2015-03-24 19:29:22 +00:00
IndVarSimplify.cpp [SCEV] Refactor out isHighCostExpansion. NFCI. 2015-04-14 03:20:28 +00:00
JumpThreading.cpp [JumpThreading] Simplify comparisons when simplifying branches 2015-05-07 00:19:14 +00:00
LICM.cpp Convert PHI getIncomingValue() to foreach over incoming_values(). NFC. 2015-05-12 20:05:31 +00:00
LLVMBuild.txt
LoadCombine.cpp Mark empty default constructors as =default if it makes the type POD 2015-04-11 18:57:14 +00:00
LoopDeletion.cpp
LoopIdiomRecognize.cpp [LoopIdiomRecognize] Transform backedge-taken count check into an assertion. 2015-05-11 21:02:34 +00:00
LoopInstSimplify.cpp
LoopInterchange.cpp Fix LoopInterchange/reductions.ll test for debug builds 2015-04-24 17:39:16 +00:00
LoopRerollPass.cpp Re-sort includes with sort-includes.py and insert raw_ostream.h where it's used. 2015-03-23 19:32:43 +00:00
LoopRotation.cpp Re-sort includes with sort-includes.py and insert raw_ostream.h where it's used. 2015-03-23 19:32:43 +00:00
LoopStrengthReduce.cpp [LSR][NFC] Remove a stale comment. 2015-04-21 20:42:50 +00:00
LoopUnrollPass.cpp [Unrolling] Refactor the start and step offsets to simplify overflow 2015-05-12 23:32:56 +00:00
LoopUnswitch.cpp
LowerAtomic.cpp
LowerExpectIntrinsic.cpp
Makefile
MemCpyOptimizer.cpp [MemCpyOpt] Look at any dependency -not just source- for memset+memcpy. 2015-05-11 23:09:46 +00:00
MergedLoadStoreMotion.cpp
NaryReassociate.cpp Resurrect r235688 2015-04-24 04:22:39 +00:00
PartiallyInlineLibCalls.cpp
PlaceSafepoints.cpp [PlaceSafepoints] Add missing "override" to PlaceBackedgeSafepointsImpl::runOnFunction 2015-05-12 21:49:47 +00:00
Reassociate.cpp don't repeat function names in comments; NFC 2015-04-22 18:04:46 +00:00
Reg2Mem.cpp
RewriteStatepointsForGC.cpp [RewriteStatepointsForGC] Extend base pointer to handle more cases w/vectors 2015-05-12 22:19:52 +00:00
SampleProfile.cpp IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
Scalar.cpp Simplify n-ary adds by reassociation 2015-04-14 04:59:22 +00:00
Scalarizer.cpp [opaque pointer type] More GEP IRBuilder API migrations 2015-04-03 23:03:54 +00:00
ScalarReplAggregates.cpp IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
SCCP.cpp [opaque pointer type] API migration for GEP constant factories 2015-04-02 18:55:32 +00:00
SeparateConstOffsetFromGEP.cpp Fix comment for NoCommonBits. 2015-04-23 22:55:48 +00:00
SimplifyCFGPass.cpp
Sink.cpp
SROA.cpp IR: Give 'DI' prefix to debug info metadata 2015-04-29 16:38:44 +00:00
StraightLineStrengthReduce.cpp [SLSR] garbage-collect unused instructions 2015-04-21 19:56:18 +00:00
StructurizeCFG.cpp Change range-based for-loops to be -Wrange-loop-analysis clean. 2015-04-15 01:21:15 +00:00
TailRecursionElimination.cpp Re-sort includes with sort-includes.py and insert raw_ostream.h where it's used. 2015-03-23 19:32:43 +00:00