1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
llvm-mirror/lib/Analysis
Craig Topper 5442613e26 [ValueTracking] Add OptimizationRemarkEmitter to the other signature for commuteKnownBits.
This is needed for an upcoming patch.

llvm-svn: 303772
2017-05-24 16:53:03 +00:00
..
AliasAnalysis.cpp
AliasAnalysisEvaluator.cpp
AliasAnalysisSummary.cpp
AliasAnalysisSummary.h
AliasSetTracker.cpp
Analysis.cpp
AssumptionCache.cpp Rename WeakVH to WeakTrackingVH; NFC 2017-05-01 17:07:49 +00:00
BasicAliasAnalysis.cpp BasicAA: Uninserted instructions have no parent, and notDifferentParent explicitly allows for this case, but getParent crashes when handed one. 2017-05-19 19:01:21 +00:00
BlockFrequencyInfo.cpp
BlockFrequencyInfoImpl.cpp
BranchProbabilityInfo.cpp [BPI] Reduce the probability of unreachable edge to minimal value greater than 0 2017-05-18 06:11:56 +00:00
CallGraph.cpp CallGraph: Remove almost-unused field 'Root'. 2017-05-11 23:59:05 +00:00
CallGraphSCCPass.cpp [Statistics] Add a method to atomically update a statistic that contains a maximum 2017-05-18 00:51:39 +00:00
CallPrinter.cpp
CaptureTracking.cpp
CFG.cpp
CFGPrinter.cpp
CFLAndersAliasAnalysis.cpp
CFLGraph.h [IR] Abstract away ArgNo+1 attribute indexing as much as possible 2017-05-03 18:17:31 +00:00
CFLSteensAliasAnalysis.cpp
CGSCCPassManager.cpp
CMakeLists.txt
CodeMetrics.cpp
ConstantFolding.cpp [ConstantFolding] Add folding for various math '__<func>_finite' routines generated from -ffast-math 2017-05-12 22:11:20 +00:00
CostModel.cpp
Delinearization.cpp
DemandedBits.cpp [ValueTracking] Remove const_casts on several calls to computeKnownBits and ComputeSignBit. NFC 2017-05-13 17:22:16 +00:00
DependenceAnalysis.cpp BitVector: add iterators for set bits 2017-05-17 01:07:53 +00:00
DivergenceAnalysis.cpp
DominanceFrontier.cpp
DomPrinter.cpp
EHPersonalities.cpp
GlobalsModRef.cpp
IndirectCallPromotionAnalysis.cpp
InlineCost.cpp [Inliner] Do not mix callsite and callee hotness based updates. 2017-05-16 21:18:09 +00:00
InstCount.cpp
InstructionSimplify.cpp InstructionSimplify: don't speculate about Constants changing. 2017-05-22 21:28:08 +00:00
Interval.cpp
IntervalPartition.cpp
IteratedDominanceFrontier.cpp
IVUsers.cpp
LazyBlockFrequencyInfo.cpp
LazyBranchProbabilityInfo.cpp
LazyCallGraph.cpp
LazyValueInfo.cpp [LazyValueInfo] Avoid unnecessary copies of ConstantRanges 2017-05-06 03:35:15 +00:00
Lint.cpp [KnownBits] Add wrapper methods for setting and clear all bits in the underlying APInts in KnownBits. 2017-05-05 17:36:09 +00:00
LLVMBuild.txt
Loads.cpp
LoopAccessAnalysis.cpp
LoopAnalysisManager.cpp
LoopInfo.cpp
LoopPass.cpp
LoopUnrollAnalyzer.cpp
MemDepPrinter.cpp
MemDerefPrinter.cpp
MemoryBuiltins.cpp
MemoryDependenceAnalysis.cpp
MemoryLocation.cpp
MemorySSA.cpp [IR] De-virtualize ~Value to save a vptr 2017-05-18 17:24:10 +00:00
MemorySSAUpdater.cpp
ModuleDebugInfoPrinter.cpp
ModuleSummaryAnalysis.cpp Ensure non-null ProfileSummaryInfo passed to ModuleSummaryIndex builder 2017-05-10 18:52:16 +00:00
ObjCARCAliasAnalysis.cpp
ObjCARCAnalysisUtils.cpp
ObjCARCInstKind.cpp
OptimizationDiagnosticInfo.cpp IR: Give function GlobalValue::getRealLinkageName() a less misleading name: dropLLVMManglingEscape(). 2017-05-16 00:39:01 +00:00
OrderedBasicBlock.cpp
PHITransAddr.cpp
PostDominators.cpp
ProfileSummaryInfo.cpp Add hasProfileSummary and has{Sample|Instrumentation}Profile methods 2017-05-16 20:14:39 +00:00
PtrUseVisitor.cpp
README.txt
RegionInfo.cpp
RegionPass.cpp
RegionPrinter.cpp
ScalarEvolution.cpp Revert "[SCEV] Do not fold dominated SCEVUnknown into AddRecExpr start" 2017-05-24 14:16:04 +00:00
ScalarEvolutionAliasAnalysis.cpp
ScalarEvolutionExpander.cpp Rename WeakVH to WeakTrackingVH; NFC 2017-05-01 17:07:49 +00:00
ScalarEvolutionNormalization.cpp
ScopedNoAliasAA.cpp
SparsePropagation.cpp
StratifiedSets.h
TargetLibraryInfo.cpp Revert "Add pthread_self function prototype and make it speculatable." 2017-05-21 00:37:55 +00:00
TargetTransformInfo.cpp [LoopVectorizer] Let target prefer scalar addressing computations. 2017-05-24 13:42:56 +00:00
Trace.cpp
TypeBasedAliasAnalysis.cpp
TypeMetadataUtils.cpp
ValueTracking.cpp [ValueTracking] Add OptimizationRemarkEmitter to the other signature for commuteKnownBits. 2017-05-24 16:53:03 +00:00
VectorUtils.cpp Introduce experimental generic intrinsics for horizontal vector reductions. 2017-05-09 10:43:25 +00:00

Analysis Opportunities:

//===---------------------------------------------------------------------===//

In test/Transforms/LoopStrengthReduce/quadradic-exit-value.ll, the
ScalarEvolution expression for %r is this:

  {1,+,3,+,2}<loop>

Outside the loop, this could be evaluated simply as (%n * %n), however
ScalarEvolution currently evaluates it as

  (-2 + (2 * (trunc i65 (((zext i64 (-2 + %n) to i65) * (zext i64 (-1 + %n) to i65)) /u 2) to i64)) + (3 * %n))

In addition to being much more complicated, it involves i65 arithmetic,
which is very inefficient when expanded into code.

//===---------------------------------------------------------------------===//

In formatValue in test/CodeGen/X86/lsr-delayed-fold.ll,

ScalarEvolution is forming this expression:

((trunc i64 (-1 * %arg5) to i32) + (trunc i64 %arg5 to i32) + (-1 * (trunc i64 undef to i32)))

This could be folded to

(-1 * (trunc i64 undef to i32))

//===---------------------------------------------------------------------===//