1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
llvm-mirror/lib/Analysis
Mircea Trofin 93fa18dd41 [NFC] small rename of private member in InlineCost.cpp
Summary:
Follow-up from https://reviews.llvm.org/D71733. Also moved an
initialization to the base class, where it belonged in the first place.

Reviewers: eraman, davidxl

Reviewed By: davidxl

Subscribers: hiraditya, haicheng, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D72949
2020-01-20 13:03:15 -08:00
..
AliasAnalysis.cpp Add ExternalAAWrapperPass to createLegacyPMAAResults. 2020-01-06 08:50:18 +00:00
AliasAnalysisEvaluator.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
AliasAnalysisSummary.cpp
AliasAnalysisSummary.h
AliasSetTracker.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
Analysis.cpp
AssumptionCache.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
BasicAliasAnalysis.cpp [BasicAA] Use GEP as context for computeKnownBits in aliasGEP. 2019-12-12 17:18:04 +00:00
BlockFrequencyInfo.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
BlockFrequencyInfoImpl.cpp
BranchProbabilityInfo.cpp [BrachProbablityInfo] Add invalidate method. 2020-01-17 10:47:51 -08:00
CallGraph.cpp [CallGraph] Add invalidate method. 2020-01-17 10:47:51 -08:00
CallGraphSCCPass.cpp
CallPrinter.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
CaptureTracking.cpp
CFG.cpp
CFGPrinter.cpp Add missing includes needed to prune LLVMContext.h include, NFC 2019-11-14 15:23:15 -08:00
CFLAndersAliasAnalysis.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
CFLGraph.h
CFLSteensAliasAnalysis.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
CGSCCPassManager.cpp
CMakeLists.txt Revert "[SCEV] Move ScalarEvolutionExpander.cpp to Transforms/Utils (NFC)." 2020-01-04 18:44:38 +00:00
CmpInstAnalysis.cpp
CodeMetrics.cpp
ConstantFolding.cpp Reland [DataLayout] Fix occurrences that size and range of pointers are assumed to be the same. 2019-12-13 14:30:21 +00:00
CostModel.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
DDG.cpp [DDG] Data Dependence Graph - Topological Sort (Memory Leak Fix) 2019-12-03 10:08:25 -05:00
Delinearization.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
DemandedBits.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
DependenceAnalysis.cpp [NFC][DA] Remove duplicate code in checkSrcSubscript and checkDstSubscript 2019-12-27 10:06:19 -05:00
DependenceGraphBuilder.cpp [DDG] Data Dependence Graph - Ordinals 2019-12-19 10:57:33 -05:00
DivergenceAnalysis.cpp
DominanceFrontier.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
DomPrinter.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
DomTreeUpdater.cpp [NFC] Fixes -Wrange-loop-analysis warnings 2020-01-01 20:01:37 +01:00
EHPersonalities.cpp
GlobalsModRef.cpp [GlobalsModRef] Add invalidate method 2020-01-17 10:33:54 -08:00
GuardUtils.cpp Slightly speculative buildbot fix for issue reported in 8293f74 commit thread 2019-11-22 11:37:17 -08:00
IndirectCallPromotionAnalysis.cpp Add missing includes needed to prune LLVMContext.h include, NFC 2019-11-14 15:23:15 -08:00
InlineCost.cpp [NFC] small rename of private member in InlineCost.cpp 2020-01-20 13:03:15 -08:00
InstCount.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
InstructionPrecedenceTracking.cpp Add missing includes needed to prune LLVMContext.h include, NFC 2019-11-14 15:23:15 -08:00
InstructionSimplify.cpp [InstSimplify] fold select of vector constants that include undef elements 2020-01-20 08:48:32 -05:00
Interval.cpp
IntervalPartition.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
IVDescriptors.cpp [SCEV] Remove unused ScalarEvolutionExpander.h includes (NFC). 2020-01-04 18:29:35 +00:00
IVUsers.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
LazyBlockFrequencyInfo.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
LazyBranchProbabilityInfo.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
LazyCallGraph.cpp [LazyCallGraph] Add invalidate method. 2020-01-17 10:47:51 -08:00
LazyValueInfo.cpp Temporarily revert "Reapply [LVI] Normalize pointer behavior" and "[LVI] Restructure caching" 2019-12-20 10:25:57 -08:00
LegacyDivergenceAnalysis.cpp Add missing includes needed to prune LLVMContext.h include, NFC 2019-11-14 15:23:15 -08:00
Lint.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
LLVMBuild.txt
Loads.cpp Reland [DataLayout] Fix occurrences that size and range of pointers are assumed to be the same. 2019-12-13 14:30:21 +00:00
LoopAccessAnalysis.cpp [VectorUtils] Rework the Vector Function Database (VFDatabase). 2020-01-16 15:08:26 +00:00
LoopAnalysisManager.cpp
LoopCacheAnalysis.cpp [LoopCacheAnalysis]: Fix assertion failure during cost computation 2019-11-15 14:56:26 -05:00
LoopInfo.cpp Rename LoopInfo::isRotated() to LoopInfo::isRotatedForm(). 2019-12-12 14:22:36 -05:00
LoopPass.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
LoopUnrollAnalyzer.cpp
MemDepPrinter.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
MemDerefPrinter.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
MemoryBuiltins.cpp Reland [DataLayout] Fix occurrences that size and range of pointers are assumed to be the same. 2019-12-13 14:30:21 +00:00
MemoryDependenceAnalysis.cpp [MemDepAnalysis/VNCoercion] Move static method to its only use. [NFCI] 2020-01-17 15:18:42 -08:00
MemoryLocation.cpp [IR] Split out target specific intrinsic enums into separate headers 2019-12-11 18:02:14 -08:00
MemorySSA.cpp [MemorySSA] Combine verifications. 2019-11-25 16:05:38 -08:00
MemorySSAUpdater.cpp [MemorySSA] Moving at the end often means before terminator. 2019-11-20 17:11:00 -08:00
ModuleDebugInfoPrinter.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
ModuleSummaryAnalysis.cpp [ThinLTO] Always import constants 2020-01-15 19:29:01 +03:00
MustExecute.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
ObjCARCAliasAnalysis.cpp
ObjCARCAnalysisUtils.cpp
ObjCARCInstKind.cpp
OptimizationRemarkEmitter.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
OrderedBasicBlock.cpp
OrderedInstructions.cpp
PHITransAddr.cpp
PhiValues.cpp [PhiValues] Remove redundant map searches 2019-11-23 10:32:56 +02:00
PostDominators.cpp [CodeMoverUtils] Added an API to check if an instruction can be safely 2019-11-22 21:29:08 +00:00
ProfileSummaryInfo.cpp Add missing includes needed to prune LLVMContext.h include, NFC 2019-11-14 15:23:15 -08:00
PtrUseVisitor.cpp
README.txt
RegionInfo.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
RegionPass.cpp
RegionPrinter.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
ScalarEvolution.cpp [SCEV] Swap guards estimation sequence. NFC 2020-01-20 16:41:16 +03:00
ScalarEvolutionAliasAnalysis.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
ScalarEvolutionExpander.cpp Revert "[SCEV] Move ScalarEvolutionExpander.cpp to Transforms/Utils (NFC)." 2020-01-04 18:44:38 +00:00
ScalarEvolutionNormalization.cpp
ScopedNoAliasAA.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
StackSafetyAnalysis.cpp Add missing includes needed to prune LLVMContext.h include, NFC 2019-11-14 15:23:15 -08:00
StratifiedSets.h
SyncDependenceAnalysis.cpp
SyntheticCountsUtils.cpp
TargetLibraryInfo.cpp [NFC] Use isX86() instead of getArch() 2020-01-07 17:35:44 +08:00
TargetTransformInfo.cpp [NFC][TTI] Add Alignment for isLegalMasked[Gather/Scatter] 2019-12-18 09:14:39 +00:00
Trace.cpp
TypeBasedAliasAnalysis.cpp [Metadata] Add TBAA struct metadata to AAMDNode 2020-01-06 11:05:15 +03:00
TypeMetadataUtils.cpp
ValueLattice.cpp
ValueLatticeUtils.cpp
ValueTracking.cpp [ValueTracking] isKnownNonZero() should take non-null-ness assumptions into consideration (PR43267) 2019-12-20 01:47:57 +03:00
VectorUtils.cpp [VectorUtils] Rework the Vector Function Database (VFDatabase). 2020-01-16 15:08:26 +00:00
VFABIDemangling.cpp [VectorUtils] API for VFShape, update VFInfo. 2019-12-04 20:40:05 +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))

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