1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00
llvm-mirror/lib/Analysis
Craig Topper 9eeafe7bcb [ValueTracking] Improve llvm.abs handling in computeKnownBits.
Add the optimizations we have in the SelectionDAG version.
Known non-negative copies all known bits. Any known one other than
the sign bit makes result non-negative.

Differential Revision: https://reviews.llvm.org/D85000
2020-07-31 15:55:03 -07:00
..
models/inliner [llvm][NFC] ML Policies: changed the saved_model protobuf to text 2020-07-13 11:07:07 -07:00
AliasAnalysis.cpp [NFC] Remove unused GetUnderlyingObject paramenter 2020-07-31 02:10:03 -07:00
AliasAnalysisEvaluator.cpp [IR] Replace all uses of CallBase::getCalledValue() with getCalledOperand(). 2020-04-27 22:17:03 -07:00
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 [NFC] Remove unused GetUnderlyingObject paramenter 2020-07-31 02:10:03 -07:00
BlockFrequencyInfo.cpp [BFI][CGP] Add limited support for detecting missed BFI updates and fix one in CodeGenPrepare. 2020-05-07 11:58:00 -07:00
BlockFrequencyInfoImpl.cpp
BranchProbabilityInfo.cpp [BPI] Fix memory leak reported by sanitizer bots 2020-07-28 19:53:46 +07:00
CallGraph.cpp [CallGraph] Preserve call records vector when replacing call edge 2020-07-27 06:02:55 -07:00
CallGraphSCCPass.cpp [CallGraph] Update callback call sites in RefreshCallGraph 2020-07-14 22:33:57 -05:00
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 CFG.h - reduce includes to forward declarations. NFC. 2020-06-06 15:06:42 +01:00
CFGPrinter.cpp [CFG] Turning on Heat Colors for CFG by default 2020-04-29 20:44:10 +00:00
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 CodeMetrics.cpp - remove unused includes. NFC. 2020-05-10 16:59:55 +01:00
ConstantFolding.cpp [ConstantFolding] fold abs intrinsic 2020-07-31 14:08:44 -04: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 SmallPtrSet::find -> SmallPtrSet::count 2020-06-07 22:38:08 +02:00
DevelopmentModeInlineAdvisor.cpp [llvm][NFC] TensorSpec abstraction for ML evaluator 2020-07-29 16:29:21 -07:00
DivergenceAnalysis.cpp [DA] conservatively mark the join of every divergent branch 2020-06-18 17:39:20 +05:30
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 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 [CallPrinter] Remove static constructor. 2020-06-17 13:02:58 +02:00
IndirectCallPromotionAnalysis.cpp
InlineAdvisor.cpp [llvm] Development-mode InlineAdvisor 2020-07-20 11:01:56 -07:00
InlineCost.cpp [InlineCost] GetElementPtr with constant operands 2020-06-25 18:09:51 +00:00
InlineSizeEstimatorAnalysis.cpp [llvm][NFC] TensorSpec abstraction for ML evaluator 2020-07-29 16:29:21 -07:00
InstCount.cpp
InstructionPrecedenceTracking.cpp
InstructionSimplify.cpp [NFC] Remove unused GetUnderlyingObject paramenter 2020-07-31 02:10:03 -07:00
Interval.cpp
IntervalPartition.cpp
IVDescriptors.cpp
IVUsers.cpp
LazyBlockFrequencyInfo.cpp
LazyBranchProbabilityInfo.cpp
LazyCallGraph.cpp
LazyValueInfo.cpp [NFC] Remove unused GetUnderlyingObject paramenter 2020-07-31 02:10:03 -07:00
LegacyDivergenceAnalysis.cpp
Lint.cpp [NFC] Remove unused GetUnderlyingObject paramenter 2020-07-31 02:10:03 -07:00
LLVMBuild.txt [llvm][NFC] Move content of ML subdirectory into Analysis 2020-06-15 14:35:33 -07:00
Loads.cpp [Analysis] isDereferenceableAndAlignedPointer(): don't crash on bitcast <1 x ???*> to ???* 2020-06-27 18:30:59 +03:00
LoopAccessAnalysis.cpp [NFC] Remove unused GetUnderlyingObject paramenter 2020-07-31 02:10:03 -07:00
LoopAnalysisManager.cpp
LoopCacheAnalysis.cpp LoopAnalysisManager.h - reduce includes to forward declarations. NFC. 2020-06-06 14:06:46 +01:00
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 ScalarEvolution.h - reduce LoopInfo.h include to forward declarations. NFC. 2020-06-17 15:48:23 +01:00
MemDepPrinter.cpp GVN.h - reduce AliasAnalysis.h include to forward declaration. NFC. 2020-06-25 16:59:35 +01:00
MemDerefPrinter.cpp Loads.h - reduce AliasAnalysis.h include to forward declarations. NFC. 2020-06-24 13:49:04 +01:00
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 Fix MemoryLocation.h use without Instructions.h 2020-05-26 17:19:14 +01:00
MemorySSA.cpp [MemorySSA] Pass DT to the upward iterator for proper PhiTranslation. 2020-04-29 14:28:31 -07:00
MemorySSAUpdater.cpp [GraphDiff] Use class method getChildren instead of GraphTraits. 2020-07-27 16:12:34 -07:00
MLInlineAdvisor.cpp Reapply "Rename InlineFeatureAnalysis to FunctionPropertiesAnalysis" 2020-07-22 10:07:35 -07:00
ModuleDebugInfoPrinter.cpp
ModuleSummaryAnalysis.cpp [StackSafety] Pass summary into codegen 2020-06-10 21:02:54 -07:00
MustExecute.cpp MustBeExecutedContextPrinter::runOnModule: Use unique_ptr to simplify/clarify ownership 2020-04-28 11:30:53 -07:00
ObjCARCAliasAnalysis.cpp [NFC] Remove unused GetUnderlyingObject paramenter 2020-07-31 02:10:03 -07:00
ObjCARCAnalysisUtils.cpp
ObjCARCInstKind.cpp [Analysis/Transforms/Sanitizers] As part of using inclusive language 2020-06-20 00:42:26 -07:00
OptimizationRemarkEmitter.cpp [BPI][NFC] Reuse post dominantor tree from analysis manager when available 2020-04-30 11:31:03 +07:00
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 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] Remove premature assert. PR46786 2020-07-22 15:43:16 +07:00
ScalarEvolutionAliasAnalysis.cpp
ScalarEvolutionDivision.cpp [NFCI] SCEV: promote ScalarEvolutionDivision into an publicly usable class 2020-06-25 00:58:53 +03:00
ScalarEvolutionNormalization.cpp
ScopedNoAliasAA.cpp Rename scoped-noalias -> scoped-noalias-aa 2020-07-24 12:14:27 -07:00
StackLifetime.cpp [StackSafety,NFC] Don't rerun on LiveIn change 2020-06-19 21:29:31 -07:00
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 [Analysis] TTI: Add CastContextHint for getCastInstrCost 2020-07-29 13:32:53 +01:00
TFUtils.cpp [llvm][NFC] TensorSpec abstraction for ML evaluator 2020-07-29 16:29:21 -07:00
Trace.cpp
TypeBasedAliasAnalysis.cpp
TypeMetadataUtils.cpp TypeMetadataUtils.h - reduce Instructions.h include to forward declaration. NFC. 2020-06-05 17:40:33 +01:00
ValueLattice.cpp
ValueLatticeUtils.cpp [ValueLattice] Simplify canTrackGlobalVariableInterprocedurally (NFC). 2020-07-09 18:33:09 +01:00
ValueTracking.cpp [ValueTracking] Improve llvm.abs handling in computeKnownBits. 2020-07-31 15:55:03 -07:00
VectorUtils.cpp [LV] Add abs/smin/smax/umin/umax intrinsics to isTriviallyVectorizable 2020-07-29 10:23:07 -07:00
VFABIDemangling.cpp [VFABI] Fix parsing of uniform parameters that shouldn't expect step or positional data. 2020-05-27 16:07:45 +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))

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