1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
llvm-mirror/include/llvm/Analysis
Hal Finkel 9ede5a39dd Make use of @llvm.assume from LazyValueInfo
This change teaches LazyValueInfo to use the @llvm.assume intrinsic. Like with
the known-bits change (r217342), this requires feeding a "context" instruction
pointer through many functions. Aside from a little refactoring to reuse the
logic that turns predicates into constant ranges in LVI, the only new code is
that which can 'merge' the range from an assumption into that otherwise
computed. There is also a small addition to JumpThreading so that it can have
LVI use assumptions in the same block as the comparison feeding a conditional
branch.

With this patch, we can now simplify this as expected:
int foo(int a) {
  __builtin_assume(a > 5);
  if (a > 3) {
    bar();
    return 1;
  }
  return 0;
}

llvm-svn: 217345
2014-09-07 20:29:59 +00:00
..
AliasAnalysis.h AA metadata refactoring (introduce AAMDNodes) 2014-07-24 12:16:19 +00:00
AliasSetTracker.h AA metadata refactoring (introduce AAMDNodes) 2014-07-24 12:16:19 +00:00
AssumptionTracker.h Add an Assumption-Tracking Pass 2014-09-07 12:44:26 +00:00
BlockFrequencyInfo.h blockfreq: Remove unnecessary template parameters 2014-04-11 23:21:02 +00:00
BlockFrequencyInfoImpl.h BFI: Add constructor for Weight 2014-07-12 00:26:00 +00:00
BranchProbabilityInfo.h [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-15 04:59:12 +00:00
CallGraph.h Remove Support/IncludeFile.h and its only user. This is actively harmful, since 2014-08-07 20:41:17 +00:00
CallGraphSCCPass.h [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-05 07:30:04 +00:00
CallPrinter.h Added -view-callgraph module pass. 2013-01-11 17:28:14 +00:00
CaptureTracking.h Match semantics of PointerMayBeCapturedBefore to its name by default 2014-07-21 21:30:22 +00:00
CFG.h [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-15 04:59:12 +00:00
CFGPrinter.h Tweak CFGPrinter to wrap very long names. 2014-08-20 17:38:12 +00:00
CGSCCPassManager.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
CodeMetrics.h Add functions for finding ephemeral values 2014-09-07 13:49:57 +00:00
ConstantFolding.h [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-14 00:51:57 +00:00
ConstantsScanner.h [Modules] Move InstIterator out of the Support library, where it had no 2014-03-04 10:30:26 +00:00
DependenceAnalysis.h Revert "Analysis: unique_ptr-ify DependenceAnalysis::collectCoeffInfo" 2014-08-26 02:03:38 +00:00
DominanceFrontier.h Try to fix MSVC build 2014-07-12 22:19:49 +00:00
DominanceFrontierImpl.h Canonicalize header guards into a common format. 2014-08-13 16:26:38 +00:00
DomPrinter.h
DOTGraphTraitsPass.h Modernize raw_fd_ostream's constructor a bit. 2014-08-25 18:16:47 +00:00
FindUsedTypes.h [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-05 07:30:04 +00:00
InlineCost.h Add functions for finding ephemeral values 2014-09-07 13:49:57 +00:00
InstructionSimplify.h Make use of @llvm.assume in ValueTracking (computeKnownBits, etc.) 2014-09-07 18:57:58 +00:00
Interval.h Remove copy ctors that did the same thing as the default one. 2014-03-11 11:32:49 +00:00
IntervalIterator.h [Modules] Move CFG.h to the IR library as it defines graph traits over 2014-03-04 11:45:46 +00:00
IntervalPartition.h [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-15 04:59:12 +00:00
IVUsers.h Repace SmallPtrSet with SmallPtrSetImpl in function arguments to avoid needing to mention the size. 2014-08-21 05:55:13 +00:00
JumpInstrTableInfo.h Add a new attribute called 'jumptable' that creates jump-instruction tables for functions marked with this attribute. 2014-06-05 19:29:43 +00:00
LazyCallGraph.h Fix typos in comments, NFC 2014-08-29 21:53:01 +00:00
LazyValueInfo.h Make use of @llvm.assume from LazyValueInfo 2014-09-07 20:29:59 +00:00
LibCallAliasAnalysis.h [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-15 04:59:12 +00:00
LibCallSemantics.h [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-15 04:59:12 +00:00
Lint.h Remove unused STL header includes. 2011-04-23 19:53:52 +00:00
Loads.h AA metadata refactoring (introduce AAMDNodes) 2014-07-24 12:16:19 +00:00
LoopInfo.h Add optimization remarks to the loop unroller and vectorizer. 2014-04-29 14:27:31 +00:00
LoopInfoImpl.h [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-14 00:51:57 +00:00
LoopIterator.h Remove unneeded #includes. 2013-02-09 13:29:10 +00:00
LoopPass.h [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-05 07:30:04 +00:00
MemoryBuiltins.h [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-15 04:59:12 +00:00
MemoryDependenceAnalysis.h Make use of @llvm.assume in ValueTracking (computeKnownBits, etc.) 2014-09-07 18:57:58 +00:00
Passes.h Add a CFL Alias Analysis implementation 2014-09-02 21:43:13 +00:00
PHITransAddr.h Make use of @llvm.assume in ValueTracking (computeKnownBits, etc.) 2014-09-07 18:57:58 +00:00
PostDominators.h Fix typos in comments, NFC 2014-08-29 21:53:01 +00:00
PtrUseVisitor.h [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-15 04:59:12 +00:00
RegionInfo.h This declaration has no definition, which is causing MSVC to emit several "no suitable definition provided for explicit template instantiation request" C4661 warnings. 2014-07-21 13:08:08 +00:00
RegionInfoImpl.h Header hygiene: remove using directive and #undef DEBUG_TYPE once we're done. 2014-07-30 00:25:24 +00:00
RegionIterator.h Templatify RegionInfo so it works on MachineBasicBlocks 2014-07-19 18:29:29 +00:00
RegionPass.h [C++11] Add 'override' keyword to virtual methods that override their base class. 2014-03-05 07:30:04 +00:00
RegionPrinter.h
ScalarEvolution.h Make use of @llvm.assume in ValueTracking (computeKnownBits, etc.) 2014-09-07 18:57:58 +00:00
ScalarEvolutionExpander.h [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-15 04:59:12 +00:00
ScalarEvolutionExpressions.h removed circular definitions in comments 2014-07-14 21:51:59 +00:00
ScalarEvolutionNormalization.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
SparsePropagation.h [C++11] More 'nullptr' conversion. In some cases just using a boolean check instead of comparing to nullptr. 2014-04-15 04:59:12 +00:00
TargetFolder.h Add CreatePointerBitCastOrAddrSpaceCast to IRBuilder and co. 2014-07-14 17:24:35 +00:00
TargetTransformInfo.h Fix typos in comments, NFC 2014-08-29 21:53:01 +00:00
Trace.h Fix include guards so they exactly match file names. 2013-01-10 00:45:19 +00:00
ValueTracking.h Make use of @llvm.assume in ValueTracking (computeKnownBits, etc.) 2014-09-07 18:57:58 +00:00