1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00
llvm-mirror/lib/Analysis
Tyker 361dc8333f [NFC] Split Knowledge retention and place it more appropriatly
Summary:
Splitting Knowledge retention into Queries in Analysis and Builder into Transform/Utils
allows Queries and Transform/Utils to use Analysis.

Reviewers: jdoerfert, sstefan1

Reviewed By: jdoerfert

Subscribers: mgorny, hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D77171
2020-04-02 15:01:41 +02:00
..
AliasAnalysis.cpp
AliasAnalysisEvaluator.cpp
AliasAnalysisSummary.cpp
AliasAnalysisSummary.h
AliasSetTracker.cpp
Analysis.cpp
AssumeBundleQueries.cpp [NFC] Split Knowledge retention and place it more appropriatly 2020-04-02 15:01:41 +02:00
AssumptionCache.cpp
BasicAliasAnalysis.cpp Introduce support for lib function aligned_alloc in TLI / memory builtins 2020-03-29 23:36:24 +05:30
BlockFrequencyInfo.cpp [CFG/BasicBlock] Rename succ_const to const_succ. [NFC] 2020-03-25 12:40:55 -07:00
BlockFrequencyInfoImpl.cpp
BranchProbabilityInfo.cpp [CFG/BasicBlock] Rename succ_const to const_succ. [NFC] 2020-03-25 12:40:55 -07:00
CallGraph.cpp
CallGraphSCCPass.cpp
CallPrinter.cpp
CaptureTracking.cpp
CFG.cpp [CFG/BasicBlock] Rename succ_const to const_succ. [NFC] 2020-03-25 12:40:55 -07:00
CFGPrinter.cpp
CFLAndersAliasAnalysis.cpp
CFLGraph.h
CFLSteensAliasAnalysis.cpp
CGSCCPassManager.cpp Extend TimeTrace to LLVM's new pass manager 2020-03-06 14:45:19 -08:00
CMakeLists.txt [NFC] Split Knowledge retention and place it more appropriatly 2020-04-02 15:01:41 +02:00
CmpInstAnalysis.cpp
CodeMetrics.cpp
ConstantFolding.cpp Remove "mask" operand from shufflevector. 2020-03-31 13:08:59 -07:00
CostModel.cpp
DDG.cpp
Delinearization.cpp
DemandedBits.cpp
DependenceAnalysis.cpp [DA] Delinearization of fixed-size multi-dimensional arrays 2020-02-27 10:29:01 -05:00
DependenceGraphBuilder.cpp
DivergenceAnalysis.cpp
DominanceFrontier.cpp
DomPrinter.cpp
DomTreeUpdater.cpp
EHPersonalities.cpp
GlobalsModRef.cpp
GuardUtils.cpp
IndirectCallPromotionAnalysis.cpp
InlineCost.cpp [Inliner] Inlining should honor nobuiltin attributes 2020-02-28 07:34:14 -08:00
InstCount.cpp
InstructionPrecedenceTracking.cpp [NFC] Remove obsolete checks followed by fix of isGuaranteedToTransferExecutionToSuccessor 2020-03-30 12:24:41 +07:00
InstructionSimplify.cpp Remove "mask" operand from shufflevector. 2020-03-31 13:08:59 -07:00
Interval.cpp
IntervalPartition.cpp
IVDescriptors.cpp
IVUsers.cpp
LazyBlockFrequencyInfo.cpp
LazyBranchProbabilityInfo.cpp
LazyCallGraph.cpp
LazyValueInfo.cpp [ValueLattice] Distinguish between constant ranges with/without undef. 2020-03-31 12:50:20 +01:00
LegacyDivergenceAnalysis.cpp
Lint.cpp [ConstantFolding] Always return something from ConstantFoldConstant 2020-03-04 18:24:47 +01:00
LLVMBuild.txt
Loads.cpp
LoopAccessAnalysis.cpp
LoopAnalysisManager.cpp
LoopCacheAnalysis.cpp
LoopInfo.cpp
LoopNestAnalysis.cpp [LoopNest]: Analysis to discover properties of a loop nest. 2020-03-03 18:25:19 +00:00
LoopPass.cpp
LoopUnrollAnalyzer.cpp
MemDepPrinter.cpp
MemDerefPrinter.cpp
MemoryBuiltins.cpp Introduce support for lib function aligned_alloc in TLI / memory builtins 2020-03-29 23:36:24 +05:30
MemoryDependenceAnalysis.cpp [DependenceAnalysis] Dependecies for loads marked with "ivnariant.load" should not be shared with general accesses(PR42151). 2020-03-04 18:40:02 +07:00
MemoryLocation.cpp
MemorySSA.cpp
MemorySSAUpdater.cpp
ModuleDebugInfoPrinter.cpp
ModuleSummaryAnalysis.cpp
MustExecute.cpp [Attributor] Detect possibly unbounded cycles in functions 2020-03-13 11:17:33 -05:00
ObjCARCAliasAnalysis.cpp
ObjCARCAnalysisUtils.cpp
ObjCARCInstKind.cpp
OptimizationRemarkEmitter.cpp
OrderedInstructions.cpp
PHITransAddr.cpp
PhiValues.cpp
PostDominators.cpp
ProfileSummaryInfo.cpp [PSI] Add the isCold query support with a given percentile value. 2020-03-02 12:50:15 -08:00
PtrUseVisitor.cpp
README.txt
RegionInfo.cpp
RegionPass.cpp
RegionPrinter.cpp
ScalarEvolution.cpp [SCEV] Use backedge SCEV of PHI only if its input is loop invariant 2020-03-31 18:39:24 +07:00
ScalarEvolutionAliasAnalysis.cpp
ScalarEvolutionExpander.cpp Revert "[LSR] re-add testcase for wrongly phi node elimination - NFC" 2020-04-01 12:58:06 +00:00
ScalarEvolutionNormalization.cpp
ScopedNoAliasAA.cpp
StackSafetyAnalysis.cpp [memtag] Plug in stack safety analysis. 2020-03-16 16:35:25 -07:00
StratifiedSets.h
SyncDependenceAnalysis.cpp [CFG/BasicBlock] Rename succ_const to const_succ. [NFC] 2020-03-25 12:40:55 -07:00
SyntheticCountsUtils.cpp
TargetLibraryInfo.cpp Introduce support for lib function aligned_alloc in TLI / memory builtins 2020-03-29 23:36:24 +05:30
TargetTransformInfo.cpp [LoopDataPrefetch + SystemZ] Let target decide on prefetching for each loop. 2020-04-02 14:57:46 +02:00
Trace.cpp
TypeBasedAliasAnalysis.cpp
TypeMetadataUtils.cpp
ValueLattice.cpp [ValueLattice] Distinguish between constant ranges with/without undef. 2020-03-31 12:50:20 +01:00
ValueLatticeUtils.cpp
ValueTracking.cpp Remove "mask" operand from shufflevector. 2020-03-31 13:08:59 -07:00
VectorUtils.cpp [VectorUtils][X86] De-templatize scaleShuffleMask and 2 X86 shuffle mask helpers and move their implementation to cpp files 2020-04-01 00:46:48 -07:00
VFABIDemangling.cpp

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))

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