llvm-project/llvm/lib/Transforms/Scalar
Philip Reames eb3e9dad7f [LVI/CVP] Teach LVI about range metadata
Somewhat shockingly for an analysis pass which is computing constant ranges, LVI did not understand the ranges provided by range metadata.

As part of this change, I included a change to CVP primarily because doing so made it much easier to write small self contained test cases. CVP was previously only handling the non-local operand case, but given that LVI can sometimes figure out information about instructions standalone, I don't see any reason to restrict this.  There could possibly be a compile time impact from this, but I suspect it should be minimal.  If anyone has an example which substaintially regresses, please let me know.  I could restrict the block local handling to ICmps feeding Terminator instructions if needed.  

Note that this patch continues a somewhat bad practice in LVI. In many cases, we know facts about values, and separate context sensitive facts about values. LVI makes no effort to distinguish and will frequently cache the same value fact repeatedly for different contexts. I would like to change this, but that's a large enough change that I want it to go in separately with clear documentation of what's changing. Other examples of this include the non-null handling, and arguments.

As a meta comment: the entire motivation of this change was being able to write smaller (aka reasonable sized) test cases for a future patch teaching LVI about select instructions.

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

llvm-svn: 251606
2015-10-29 03:57:17 +00:00
..
ADCE.cpp ADCE: Fix typo in file comment. NFC 2015-09-25 21:03:46 +00:00
AlignmentFromAssumptions.cpp [SCEV] Introduce ScalarEvolution::getOne and getZero. 2015-09-23 01:59:04 +00:00
BDCE.cpp Add GlobalsAA as preserved to a bunch of transforms 2015-09-10 10:22:12 +00:00
CMakeLists.txt Convert SampleProfile pass into a Module pass. 2015-08-25 15:25:11 +00:00
ConstantHoisting.cpp Scalar: Remove some implicit ilist iterator conversions, NFC 2015-10-13 18:26:00 +00:00
ConstantProp.cpp Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
CorrelatedValuePropagation.cpp [LVI/CVP] Teach LVI about range metadata 2015-10-29 03:57:17 +00:00
DCE.cpp Scalar: Remove some implicit ilist iterator conversions, NFC 2015-10-13 18:26:00 +00:00
DeadStoreElimination.cpp Scalar: Remove some implicit ilist iterator conversions, NFC 2015-10-13 18:26:00 +00:00
EarlyCSE.cpp [ScalarOpts] Remove dead code. 2015-10-15 15:08:58 +00:00
FlattenCFGPass.cpp Scalar: Remove some implicit ilist iterator conversions, NFC 2015-10-13 18:26:00 +00:00
Float2Int.cpp Prune trailing whitespaces. 2015-09-22 11:19:03 +00:00
GVN.cpp GVN: don't try to replace instruction with itself. 2015-10-23 20:30:02 +00:00
IndVarSimplify.cpp Revert r251492 "[IndVarSimplify] Rewrite loop exit values with their 2015-10-28 05:15:51 +00:00
InductiveRangeCheckElimination.cpp Scalar: Remove some implicit ilist iterator conversions, NFC 2015-10-13 18:26:00 +00:00
JumpThreading.cpp [JumpThreading] Use dominating conditions to prove implications 2015-10-28 21:27:08 +00:00
LICM.cpp Scalar: Remove remaining ilist iterator implicit conversions 2015-10-13 19:26:58 +00:00
LLVMBuild.txt Update libdeps in LLVMipo and LLVMScalarOpts, corresponding to r245940. 2015-08-25 17:11:17 +00:00
LoadCombine.cpp [PM/AA] Rebuild LLVM's alias analysis infrastructure in a way compatible 2015-09-09 17:55:00 +00:00
LoopDeletion.cpp Add GlobalsAA as preserved to a bunch of transforms 2015-09-10 10:22:12 +00:00
LoopDistribute.cpp [LVer] Fix FIXME: hide addPHINodes, NFC 2015-08-20 17:22:29 +00:00
LoopIdiomRecognize.cpp Typo. 2015-10-28 15:08:33 +00:00
LoopInstSimplify.cpp Scalar: Remove remaining ilist iterator implicit conversions 2015-10-13 19:26:58 +00:00
LoopInterchange.cpp Convert assert(false) into llvm_unreachable where it makes sense. 2015-10-25 22:28:27 +00:00
LoopRerollPass.cpp [ScalarOpts] Remove dead code. 2015-10-15 15:08:58 +00:00
LoopRotation.cpp Scalar: Remove remaining ilist iterator implicit conversions 2015-10-13 19:26:58 +00:00
LoopStrengthReduce.cpp Scalar: Remove remaining ilist iterator implicit conversions 2015-10-13 19:26:58 +00:00
LoopUnrollPass.cpp [ScalarOpts] Remove dead code. 2015-10-15 15:08:58 +00:00
LoopUnswitch.cpp LoopPass: Simplify the API for adding a new loop. NFC 2015-10-22 21:21:32 +00:00
LowerAtomic.cpp Scalar: Remove remaining ilist iterator implicit conversions 2015-10-13 19:26:58 +00:00
LowerExpectIntrinsic.cpp fix typo; NFC 2015-08-24 20:11:14 +00:00
Makefile
MemCpyOptimizer.cpp Scalar: Remove remaining ilist iterator implicit conversions 2015-10-13 19:26:58 +00:00
MergedLoadStoreMotion.cpp Preserve CFG in MergedLoadStoreMotion. This fixes PR24426. 2015-10-18 19:34:10 +00:00
NaryReassociate.cpp Scalar: Remove remaining ilist iterator implicit conversions 2015-10-13 19:26:58 +00:00
PartiallyInlineLibCalls.cpp Scalar: Remove remaining ilist iterator implicit conversions 2015-10-13 19:26:58 +00:00
PlaceSafepoints.cpp Scalar: Remove remaining ilist iterator implicit conversions 2015-10-13 19:26:58 +00:00
Reassociate.cpp [ScalarOpts] Remove dead code. 2015-10-15 15:08:58 +00:00
Reg2Mem.cpp Scalar: Remove remaining ilist iterator implicit conversions 2015-10-13 19:26:58 +00:00
RewriteStatepointsForGC.cpp [RS4GC] Strip noalias attribute after statepoint rewrite 2015-10-26 19:06:01 +00:00
SCCP.cpp Scalar: Remove remaining ilist iterator implicit conversions 2015-10-13 19:26:58 +00:00
SROA.cpp [ScalarOpts] Remove dead code. 2015-10-15 15:08:58 +00:00
Scalar.cpp [PM] Port SROA to the new pass manager. 2015-09-12 09:09:14 +00:00
ScalarReplAggregates.cpp ScalarReplAggregates.cpp: Try to appease clash of anonymous::SROA in modules build. 2015-10-24 06:42:42 +00:00
Scalarizer.cpp Scalar: Remove remaining ilist iterator implicit conversions 2015-10-13 19:26:58 +00:00
SeparateConstOffsetFromGEP.cpp Scalar: Remove remaining ilist iterator implicit conversions 2015-10-13 19:26:58 +00:00
SimplifyCFGPass.cpp Scalar: Remove remaining ilist iterator implicit conversions 2015-10-13 19:26:58 +00:00
Sink.cpp [Sink] Don't check BB.empty() 2015-10-22 20:29:08 +00:00
SpeculativeExecution.cpp Scalar: Remove remaining ilist iterator implicit conversions 2015-10-13 19:26:58 +00:00
StraightLineStrengthReduce.cpp [SCEV] Introduce ScalarEvolution::getOne and getZero. 2015-09-23 01:59:04 +00:00
StructurizeCFG.cpp Scalar: Remove remaining ilist iterator implicit conversions 2015-10-13 19:26:58 +00:00
TailRecursionElimination.cpp Scalar: Remove remaining ilist iterator implicit conversions 2015-10-13 19:26:58 +00:00