1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 04:32:44 +01:00
llvm-mirror/lib/Analysis
Sanjay Patel 8a486ecfa3 [InstSimplify] reduce code duplication for binop expansion; NFC
D84250 proposes to extend this code, so the duplication for
the commuted case would continue to grow.
2020-07-23 08:35:21 -04:00
..
models/inliner [llvm][NFC] ML Policies: changed the saved_model protobuf to text 2020-07-13 11:07:07 -07:00
AliasAnalysis.cpp
AliasAnalysisEvaluator.cpp
AliasAnalysisSummary.cpp
AliasAnalysisSummary.h
AliasSetTracker.cpp
Analysis.cpp
AssumeBundleQueries.cpp Temporarily Revert "[AssumeBundles] Use operand bundles to encode alignment assumptions" 2020-07-16 11:54:04 -07:00
AssumptionCache.cpp
BasicAliasAnalysis.cpp [BasicAA] Fix -basicaa-recphi for geps with negative offsets 2020-07-16 17:22:40 +01:00
BlockFrequencyInfo.cpp
BlockFrequencyInfoImpl.cpp
BranchProbabilityInfo.cpp [BPI] Compile time improvement when erasing blocks (NFC) 2020-07-10 16:55:54 -07:00
CallGraph.cpp [CallGraph] Ignore callback uses 2020-07-14 13:08:49 -07:00
CallGraphSCCPass.cpp [CallGraph] Update callback call sites in RefreshCallGraph 2020-07-14 22:33:57 -05:00
CallPrinter.cpp
CaptureTracking.cpp
CFG.cpp
CFGPrinter.cpp
CFLAndersAliasAnalysis.cpp
CFLGraph.h
CFLSteensAliasAnalysis.cpp
CGSCCPassManager.cpp
CMakeLists.txt Reapply "Rename InlineFeatureAnalysis to FunctionPropertiesAnalysis" 2020-07-22 10:07:35 -07:00
CmpInstAnalysis.cpp
CodeMetrics.cpp
ConstantFolding.cpp [SVE] Remove calls to VectorType::getNumElements from Analysis 2020-07-22 15:19:05 -07:00
CostModel.cpp
DDG.cpp
Delinearization.cpp
DemandedBits.cpp
DependenceAnalysis.cpp
DependenceGraphBuilder.cpp
DevelopmentModeInlineAdvisor.cpp Build: Move TF source file inclusion from build system to source files 2020-07-21 13:02:34 -04:00
DivergenceAnalysis.cpp
DominanceFrontier.cpp
DomPrinter.cpp
DomTreeUpdater.cpp [DomTreeUpdater] Use const auto * when iterating over pointers (NFC). 2020-07-10 16:39:15 +01:00
EHPersonalities.cpp
FunctionPropertiesAnalysis.cpp Reapply "Rename InlineFeatureAnalysis to FunctionPropertiesAnalysis" 2020-07-22 10:07:35 -07:00
GlobalsModRef.cpp
GuardUtils.cpp
HeatUtils.cpp
IndirectCallPromotionAnalysis.cpp
InlineAdvisor.cpp [llvm] Development-mode InlineAdvisor 2020-07-20 11:01:56 -07:00
InlineCost.cpp
InlineSizeEstimatorAnalysis.cpp [llvm] Moved InlineSizeEstimatorAnalysis test to .ll 2020-07-16 12:25:16 -07:00
InstCount.cpp
InstructionPrecedenceTracking.cpp
InstructionSimplify.cpp [InstSimplify] reduce code duplication for binop expansion; NFC 2020-07-23 08:35:21 -04:00
Interval.cpp
IntervalPartition.cpp
IVDescriptors.cpp
IVUsers.cpp
LazyBlockFrequencyInfo.cpp
LazyBranchProbabilityInfo.cpp
LazyCallGraph.cpp
LazyValueInfo.cpp [NFC] Add 'override' keyword where missing in include/ and lib/. 2020-07-14 09:47:29 -07:00
LegacyDivergenceAnalysis.cpp
Lint.cpp [SVE] Remove calls to VectorType::getNumElements from Analysis 2020-07-22 15:19:05 -07:00
LLVMBuild.txt
Loads.cpp
LoopAccessAnalysis.cpp
LoopAnalysisManager.cpp
LoopCacheAnalysis.cpp
LoopInfo.cpp
LoopNestAnalysis.cpp
LoopPass.cpp
LoopUnrollAnalyzer.cpp
MemDepPrinter.cpp
MemDerefPrinter.cpp
MemoryBuiltins.cpp IR: Define byref parameter attribute 2020-07-20 10:23:09 -04:00
MemoryDependenceAnalysis.cpp
MemoryLocation.cpp
MemorySSA.cpp
MemorySSAUpdater.cpp
MLInlineAdvisor.cpp Reapply "Rename InlineFeatureAnalysis to FunctionPropertiesAnalysis" 2020-07-22 10:07:35 -07:00
ModuleDebugInfoPrinter.cpp
ModuleSummaryAnalysis.cpp
MustExecute.cpp
ObjCARCAliasAnalysis.cpp
ObjCARCAnalysisUtils.cpp
ObjCARCInstKind.cpp
OptimizationRemarkEmitter.cpp
PHITransAddr.cpp
PhiValues.cpp
PostDominators.cpp
ProfileSummaryInfo.cpp [NFC] Change getEntryForPercentile to be a static function in ProfileSummaryBuilder. 2020-07-09 16:38:19 -07:00
PtrUseVisitor.cpp
README.txt
RegionInfo.cpp
RegionPass.cpp
RegionPrinter.cpp
ReleaseModeModelRunner.cpp Build: Move TF source file inclusion from build system to source files 2020-07-21 13:02:34 -04:00
ScalarEvolution.cpp [SCEV] Remove premature assert. PR46786 2020-07-22 15:43:16 +07:00
ScalarEvolutionAliasAnalysis.cpp
ScalarEvolutionDivision.cpp
ScalarEvolutionNormalization.cpp
ScopedNoAliasAA.cpp
StackLifetime.cpp
StackSafetyAnalysis.cpp StackSafetyAnalysis.cpp - pass ConstantRange arg as const reference. 2020-07-10 12:13:34 +01:00
StratifiedSets.h
SyncDependenceAnalysis.cpp
SyntheticCountsUtils.cpp
TargetLibraryInfo.cpp [LLVM] Add libatomic load/store functions to TargetLibraryInfo 2020-07-18 03:18:48 +00:00
TargetTransformInfo.cpp [SVE] Remove calls to VectorType::getNumElements from Analysis 2020-07-22 15:19:05 -07:00
TFUtils.cpp Build: Move TF source file inclusion from build system to source files 2020-07-21 13:02:34 -04:00
Trace.cpp
TypeBasedAliasAnalysis.cpp
TypeMetadataUtils.cpp
ValueLattice.cpp
ValueLatticeUtils.cpp [ValueLattice] Simplify canTrackGlobalVariableInterprocedurally (NFC). 2020-07-09 18:33:09 +01:00
ValueTracking.cpp [SVE] Remove calls to VectorType::getNumElements from Analysis 2020-07-22 15:19:05 -07:00
VectorUtils.cpp [SVE] Remove calls to VectorType::getNumElements from Analysis 2020-07-22 15:19:05 -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))

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