1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00
llvm-mirror/lib/Analysis
Nikita Popov 3cea08454d [ValueTracking] Add abs intrinsics support to computeConstantRange()
Implementation is the same as for SPF_ABS.
2020-08-12 22:28:46 +02:00
..
models/inliner [NFC]{MLInliner] Point out the tests' model dependencies 2020-08-06 09:57:26 -07:00
AliasAnalysis.cpp [NFC] Remove unused GetUnderlyingObject paramenter 2020-07-31 02:10:03 -07:00
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 Use llvm::is_contained where appropriate (NFC) 2020-07-27 10:20:44 -07:00
BasicAliasAnalysis.cpp [BasicAA] Enable -basic-aa-recphi by default 2020-08-04 10:43:42 +01:00
BlockFrequencyInfo.cpp
BlockFrequencyInfoImpl.cpp
BranchProbabilityInfo.cpp [BPI] Teach BPI about bcmp function 2020-08-11 20:44:53 +02:00
CallGraph.cpp [CallGraph] Preserve call records vector when replacing call edge 2020-07-27 06:02:55 -07:00
CallGraphSCCPass.cpp
CallPrinter.cpp Revert rG5dd566b7c7b78bd- "PassManager.h - remove unnecessary Function.h/Module.h includes. NFCI." 2020-07-24 13:02:33 +01:00
CaptureTracking.cpp [NFC] GetUnderlyingObject -> getUnderlyingObject 2020-07-30 21:08:24 -07:00
CFG.cpp
CFGPrinter.cpp
CFLAndersAliasAnalysis.cpp
CFLGraph.h
CFLSteensAliasAnalysis.cpp
CGSCCPassManager.cpp [NewPM][PassInstrument] Add PrintPass callback to StandardInstrumentations 2020-07-30 10:07:57 -07:00
CMakeLists.txt Reapply "Rename InlineFeatureAnalysis to FunctionPropertiesAnalysis" 2020-07-22 10:07:35 -07:00
CmpInstAnalysis.cpp
CodeMetrics.cpp
ConstantFolding.cpp [WebAssembly][ConstantFolding] Fold fp-to-int truncation intrinsics 2020-08-10 12:40:05 -07:00
CostModel.cpp
DDG.cpp
Delinearization.cpp
DemandedBits.cpp
DependenceAnalysis.cpp [NFC] Remove unused GetUnderlyingObject paramenter 2020-07-31 02:10:03 -07:00
DependenceGraphBuilder.cpp
DevelopmentModeInlineAdvisor.cpp [NFC][MLInliner] remove curly braces for a few sinle-line loops 2020-08-10 09:32:21 -07:00
DivergenceAnalysis.cpp
DominanceFrontier.cpp
DomPrinter.cpp
DomTreeUpdater.cpp
EHPersonalities.cpp
FunctionPropertiesAnalysis.cpp Use llvm::size rather than an empty loop to get the number of top 2020-07-23 14:55:50 -07:00
GlobalsModRef.cpp [NFC] Remove unused GetUnderlyingObject paramenter 2020-07-31 02:10:03 -07:00
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][NFC] TensorSpec abstraction for ML evaluator 2020-07-29 16:29:21 -07:00
InstCount.cpp
InstructionPrecedenceTracking.cpp
InstructionSimplify.cpp Recommit "[InstSimplify] Remove select ?, undef, X -> X and select ?, X, undef -> X transforms" and its follow up patches 2020-08-12 10:45:27 -07:00
Interval.cpp
IntervalPartition.cpp
IVDescriptors.cpp [LoopVectorizer] Inloop vector reductions 2020-08-06 10:10:50 +01:00
IVUsers.cpp
LazyBlockFrequencyInfo.cpp
LazyBranchProbabilityInfo.cpp
LazyCallGraph.cpp
LazyValueInfo.cpp [LazyValueInfo] Let getEdgeValueLocal look into freeze instructions 2020-08-11 16:39:34 +09:00
LegacyDivergenceAnalysis.cpp
Lint.cpp [NFC] Remove unused GetUnderlyingObject paramenter 2020-07-31 02:10:03 -07:00
LLVMBuild.txt
Loads.cpp
LoopAccessAnalysis.cpp [NFC] Remove unused GetUnderlyingObject paramenter 2020-07-31 02:10:03 -07:00
LoopAnalysisManager.cpp
LoopCacheAnalysis.cpp
LoopInfo.cpp
LoopNestAnalysis.cpp
LoopPass.cpp Revert rG5dd566b7c7b78bd- "PassManager.h - remove unnecessary Function.h/Module.h includes. NFCI." 2020-07-24 13:02:33 +01:00
LoopUnrollAnalyzer.cpp
MemDepPrinter.cpp
MemDerefPrinter.cpp
MemoryBuiltins.cpp IR: Define byref parameter attribute 2020-07-20 10:23:09 -04:00
MemoryDependenceAnalysis.cpp [NFC] Remove unused GetUnderlyingObject paramenter 2020-07-31 02:10:03 -07:00
MemoryLocation.cpp
MemorySSA.cpp [MemorySSA] Restrict optimizations after a PhiTranslation. 2020-08-03 14:46:41 -07:00
MemorySSAUpdater.cpp Use llvm::is_contained where appropriate (NFC) 2020-08-01 21:51:06 -07:00
MLInlineAdvisor.cpp Reapply "Rename InlineFeatureAnalysis to FunctionPropertiesAnalysis" 2020-07-22 10:07:35 -07:00
ModuleDebugInfoPrinter.cpp
ModuleSummaryAnalysis.cpp
MustExecute.cpp
ObjCARCAliasAnalysis.cpp [NFC] Remove unused GetUnderlyingObject paramenter 2020-07-31 02:10:03 -07:00
ObjCARCAnalysisUtils.cpp
ObjCARCInstKind.cpp
OptimizationRemarkEmitter.cpp
PHITransAddr.cpp
PhiValues.cpp
PostDominators.cpp
ProfileSummaryInfo.cpp
PtrUseVisitor.cpp
README.txt
RegionInfo.cpp RegionInfo.cpp - remove duplicate includes that already exist in RegionInfo.h. NFC. 2020-07-23 17:50:22 +01:00
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] Look through single value PHIs. 2020-08-12 10:03:42 +01:00
ScalarEvolutionAliasAnalysis.cpp
ScalarEvolutionDivision.cpp
ScalarEvolutionNormalization.cpp
ScopedNoAliasAA.cpp Rename scoped-noalias -> scoped-noalias-aa 2020-07-24 12:14:27 -07:00
StackLifetime.cpp Revert "[StackSafety] Skip ambiguous lifetime analysis" 2020-08-07 14:02:50 -07:00
StackSafetyAnalysis.cpp [NFC][StackSafety] Add a couple of early returns 2020-08-09 23:42:09 -07: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 [Analysis] TTI: Add CastContextHint for getCastInstrCost 2020-07-29 13:32:53 +01:00
TFUtils.cpp [TFUtils] Expose untyped accessor to evaluation result tensors 2020-08-05 10:22:45 -07:00
Trace.cpp
TypeBasedAliasAnalysis.cpp
TypeMetadataUtils.cpp
ValueLattice.cpp
ValueLatticeUtils.cpp
ValueTracking.cpp [ValueTracking] Add abs intrinsics support to computeConstantRange() 2020-08-12 22:28:46 +02:00
VectorUtils.cpp [LV] Add abs/smin/smax/umin/umax intrinsics to isTriviallyVectorizable 2020-07-29 10:23:07 -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))

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