1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 03:02:36 +01:00
llvm-mirror/lib/Analysis
Arthur Eubanks cdf50f8461 [NewPM][opt] Run the "default" AA pipeline by default
We tend to assume that the AA pipeline is by default the default AA
pipeline and it's confusing when it's empty instead.

PR48779

Initially reverted due to BasicAA running analyses in an unspecified
order (multiple function calls as parameters), fixed by fetching
analyses before the call to construct BasicAA.

Reviewed By: asbirlea

Differential Revision: https://reviews.llvm.org/D95117
2021-01-21 21:08:54 -08:00
..
models/inliner
AliasAnalysis.cpp Require chained analyses in BasicAA and AAResults to be transitive 2021-01-11 11:50:07 +01:00
AliasAnalysisEvaluator.cpp [AA] Split up LocationSize::unknown() 2020-11-26 18:39:55 +01:00
AliasAnalysisSummary.cpp
AliasAnalysisSummary.h
AliasSetTracker.cpp [noalias.decl] Look through llvm.experimental.noalias.scope.decl 2021-01-19 20:09:42 +01:00
Analysis.cpp
AssumeBundleQueries.cpp
AssumptionCache.cpp [llvm] Call *(Set|Map)::erase directly (NFC) 2021-01-03 09:57:47 -08:00
BasicAliasAnalysis.cpp [NewPM][opt] Run the "default" AA pipeline by default 2021-01-21 21:08:54 -08:00
BlockFrequencyInfo.cpp
BlockFrequencyInfoImpl.cpp
BranchProbabilityInfo.cpp [BPI] Improve static heuristics for "cold" paths. 2020-12-23 22:47:36 +07:00
CallGraph.cpp [Analysis] Remove spliceFunction (NFC) 2020-12-23 21:57:25 -08:00
CallGraphSCCPass.cpp [NewPM] Support --print-before/after in NPM 2020-12-03 16:52:14 -08:00
CallPrinter.cpp [llvm] Remove redundant string initialization (NFC) 2021-01-12 21:43:46 -08:00
CaptureTracking.cpp [CaptureTracking] Add statistics (NFC) 2020-11-07 12:57:00 +01:00
CFG.cpp [Analysis] Use is_contained (NFC) 2020-12-11 21:19:31 -08:00
CFGPrinter.cpp [llvm] Use llvm::all_of (NFC) 2021-01-06 18:27:36 -08:00
CFLAndersAliasAnalysis.cpp [MemLoc] Use hasValue() method (NFC) 2020-11-19 21:53:50 +01:00
CFLGraph.h
CFLSteensAliasAnalysis.cpp
CGSCCPassManager.cpp [llvm] Use *::empty (NFC) 2021-01-16 09:40:55 -08:00
CMakeLists.txt [NFC] Move ImportedFunctionsInliningStatistics to Analysis 2021-01-20 13:18:03 -08:00
CmpInstAnalysis.cpp
CodeMetrics.cpp [LoopRotate] Calls not lowered to calls should not block rotation. 2021-01-19 14:37:36 +00:00
ConstantFolding.cpp [ConstantFold] Fold fptoi.sat intrinsics 2021-01-10 17:37:27 +01:00
ConstraintSystem.cpp [llvm] Remove redundant string initialization (NFC) 2021-01-12 21:43:46 -08:00
CostModel.cpp [Support] Introduce a new InstructionCost class 2020-12-11 08:12:54 +00:00
DDG.cpp [Analysis] Use llvm::append_range (NFC) 2020-12-29 19:23:21 -08:00
DDGPrinter.cpp [DDG] Data Dependence Graph - DOT printer - recommit 2020-12-16 12:37:36 -05:00
Delinearization.cpp
DemandedBits.cpp
DependenceAnalysis.cpp [AA] Split up LocationSize::unknown() 2020-11-26 18:39:55 +01:00
DependenceGraphBuilder.cpp [DDG] Fix duplicate edge removal during pi-block formation 2021-01-07 10:31:11 -05:00
DevelopmentModeInlineAdvisor.cpp [NewPM][Inliner] Move the 'always inliner' case in the same CGSCC pass as 'regular' inliner 2021-01-15 17:59:38 -08:00
DivergenceAnalysis.cpp [Analysis, CodeGen, IR] Use contains (NFC) 2020-12-18 19:08:17 -08:00
DominanceFrontier.cpp
DomPrinter.cpp
DomTreeUpdater.cpp [Target, Transforms] Use *Set::contains (NFC) 2021-01-08 18:39:54 -08:00
EHPersonalities.cpp [XCOFF][AIX] Generate LSDA data and compact unwind section on AIX 2020-12-02 18:42:44 +00:00
FunctionPropertiesAnalysis.cpp [llvm] Ensure newlines at the end of files (NFC) 2021-01-10 09:24:57 -08:00
GlobalsModRef.cpp Reapply [BasicAA] Handle recursive queries more efficiently 2021-01-17 10:34:35 +01:00
GuardUtils.cpp
HeatUtils.cpp
ImportedFunctionsInliningStatistics.cpp Reland "[NPM][Inliner] Factor ImportedFunctionStats in the InlineAdvisor" 2021-01-20 13:33:43 -08:00
IndirectCallPromotionAnalysis.cpp [Analysis] Remove unused system header includes 2020-11-22 10:32:37 +00:00
InlineAdvisor.cpp Reland "[NPM][Inliner] Factor ImportedFunctionStats in the InlineAdvisor" 2021-01-20 13:33:43 -08:00
InlineCost.cpp [AMDGPU][Inliner] Remove amdgpu-inline and add a new TTI inline hook 2021-01-21 20:29:17 -08:00
InlineSizeEstimatorAnalysis.cpp [MLGO] Fix build break as result of new InstructionCost (D91174) 2020-12-11 20:28:39 -08:00
InstCount.cpp
InstructionPrecedenceTracking.cpp
InstructionSimplify.cpp [InstCombine,InstSimplify] Optimize select followed by and/or/xor 2021-01-19 09:14:17 +09:00
Interval.cpp [Analysis/Interval] Remove isLoop (NFC) 2020-12-12 10:09:35 -08:00
IntervalPartition.cpp
IRSimilarityIdentifier.cpp [llvm] Use llvm::all_of (NFC) 2021-01-19 20:19:17 -08:00
IVDescriptors.cpp [LoopUtils] remove redundant opcode parameter; NFC 2021-01-04 17:05:28 -05:00
IVUsers.cpp
LazyBlockFrequencyInfo.cpp
LazyBranchProbabilityInfo.cpp
LazyCallGraph.cpp [llvm] Use llvm::drop_begin (NFC) 2021-01-14 20:30:33 -08:00
LazyValueInfo.cpp [LVI] Handle unions of conditions 2021-01-01 16:46:21 +01:00
LegacyDivergenceAnalysis.cpp [DivergenceAnalysis] Use addRequiredTransitive 2020-11-13 14:40:00 +01:00
Lint.cpp [AA] Split up LocationSize::unknown() 2020-11-26 18:39:55 +01:00
Loads.cpp Use deref facts derived from minimum object size of allocations 2020-12-03 15:01:14 -08:00
LoopAccessAnalysis.cpp [llvm] Drop unnecessary make_range (NFC) 2021-01-09 09:25:00 -08:00
LoopAnalysisManager.cpp [NFC] Reduce include files dependency. 2020-12-03 18:25:05 +03:00
LoopCacheAnalysis.cpp
LoopInfo.cpp [llvm] Use the default value of drop_begin (NFC) 2021-01-18 10:16:36 -08:00
LoopNestAnalysis.cpp [LoopNest] Remove unused include. 2021-01-05 20:05:31 +00:00
LoopPass.cpp [Analysis] Use llvm::erase_value (NFC) 2020-12-14 22:40:13 -08:00
LoopUnrollAnalyzer.cpp
MemDepPrinter.cpp [Analysis] Remove dead function getInstTypePair (NFC) 2020-12-19 10:57:35 -08:00
MemDerefPrinter.cpp Port -print-memderefs to NPM 2020-11-23 11:56:22 -08:00
MemoryBuiltins.cpp [STLExtras] Use return type from operator* of the wrapped iter. 2021-01-10 14:41:13 +00:00
MemoryDependenceAnalysis.cpp [llvm] Use llvm::lower_bound and llvm::upper_bound (NFC) 2021-01-05 21:15:59 -08:00
MemoryLocation.cpp [MemLoc] Fix debug print for LocationSize 2020-12-20 17:52:48 +01:00
MemorySSA.cpp [noalias.decl] Look through llvm.experimental.noalias.scope.decl 2021-01-19 20:09:42 +01:00
MemorySSAUpdater.cpp [DominatorTree] Add support for mixed pre/post CFG views. 2021-01-06 14:53:09 -08:00
MLInlineAdvisor.cpp Reland "[NPM][Inliner] Factor ImportedFunctionStats in the InlineAdvisor" 2021-01-20 13:33:43 -08:00
ModuleDebugInfoPrinter.cpp
ModuleSummaryAnalysis.cpp [llvm] Use the default value of drop_begin (NFC) 2021-01-18 10:16:36 -08:00
MustExecute.cpp
ObjCARCAliasAnalysis.cpp [AA] Split up LocationSize::unknown() 2020-11-26 18:39:55 +01:00
ObjCARCAnalysisUtils.cpp [NFC] Reduce include files dependency. 2020-12-03 18:25:05 +03:00
ObjCARCInstKind.cpp [llvm] Don't include StringSwitch.h where unnecessary (NFC) 2021-01-21 19:59:48 -08:00
OptimizationRemarkEmitter.cpp [BPI] Improve static heuristics for "cold" paths. 2020-12-23 22:47:36 +07:00
PHITransAddr.cpp
PhiValues.cpp
PostDominators.cpp
ProfileSummaryInfo.cpp
PtrUseVisitor.cpp
README.txt
RegionInfo.cpp
RegionPass.cpp
RegionPrinter.cpp
ReleaseModeModelRunner.cpp static const char *const foo => const char foo[] 2020-12-01 10:33:18 -08:00
ReplayInlineAdvisor.cpp Reland "[NPM][Inliner] Factor ImportedFunctionStats in the InlineAdvisor" 2021-01-20 13:33:43 -08:00
ScalarEvolution.cpp [llvm] Construct SmallVector with iterator ranges (NFC) 2021-01-20 21:35:52 -08:00
ScalarEvolutionAliasAnalysis.cpp [AA] Split up LocationSize::unknown() 2020-11-26 18:39:55 +01:00
ScalarEvolutionDivision.cpp
ScalarEvolutionNormalization.cpp
ScopedNoAliasAA.cpp [NFC] Reduce include files dependency and AA header cleanup (part 2). 2020-12-17 14:04:48 +03:00
StackLifetime.cpp
StackSafetyAnalysis.cpp [llvm] Drop unnecessary make_range (NFC) 2021-01-09 09:25:00 -08:00
StratifiedSets.h
SyncDependenceAnalysis.cpp
SyntheticCountsUtils.cpp
TargetLibraryInfo.cpp [Analysis] Use llvm::append_range (NFC) 2020-12-29 19:23:21 -08:00
TargetTransformInfo.cpp [AMDGPU][Inliner] Remove amdgpu-inline and add a new TTI inline hook 2021-01-21 20:29:17 -08:00
TFUtils.cpp [NFC][TFUtils] also include output specs lookup logic in loadOutputSpecs 2020-11-18 21:20:21 -08:00
Trace.cpp
TypeBasedAliasAnalysis.cpp [NFC] Reduce include files dependency and AA header cleanup (part 2). 2020-12-17 14:04:48 +03:00
TypeMetadataUtils.cpp
ValueLattice.cpp
ValueLatticeUtils.cpp
ValueTracking.cpp Allow nonnull/align attribute to accept poison 2021-01-20 11:31:23 +09:00
VectorUtils.cpp [noalias.decl] Look through llvm.experimental.noalias.scope.decl 2021-01-19 20:09:42 +01:00
VFABIDemangling.cpp [llvm] Use the default value of drop_begin (NFC) 2021-01-18 10:16:36 -08: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))

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