1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 12:43:36 +01:00
llvm-mirror/lib/Analysis
Jay Foad 437e1e1fd3 [IR] Revert r119493
r119493 protected against PHINode::hasConstantValue returning the PHI
node itself, but a later fix in r159687 means that can never happen, so
the workarounds are no longer required.
2020-05-19 13:17:11 +01:00
..
AliasAnalysis.cpp
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 [AssumeBundles] fix crashes 2020-05-11 11:52:21 +02:00
AssumptionCache.cpp [NFC][DwarfDebug] Add test for variables with a single location which 2020-05-11 11:49:11 +02:00
BasicAliasAnalysis.cpp [SVE] Remove calls to VectorType::isScalable from analysis 2020-04-23 12:44:22 -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 Revert "[BrachProbablityInfo] Set edge probabilities at once. NFC." 2020-05-13 08:23:09 -07:00
CallGraph.cpp
CallGraphSCCPass.cpp
CallPrinter.cpp
CaptureTracking.cpp [CaptureTracking] Make MaxUsesToExplore cheaper (NFC) 2020-04-26 09:54:15 +02:00
CFG.cpp
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 [NewPassManager] Add assertions when getting statefull cached analysis. 2020-05-13 12:38:38 -07:00
CMakeLists.txt [llvm][NFC] Move inlining decision-related APIs in InliningAdvisor. 2020-05-11 09:00:59 -07:00
CmpInstAnalysis.cpp
CodeMetrics.cpp CodeMetrics.cpp - remove unused includes. NFC. 2020-05-10 16:59:55 +01:00
ConstantFolding.cpp [SVE] Remove calls to VectorType::isScalable from analysis 2020-04-23 12:44:22 -07:00
CostModel.cpp
DDG.cpp
Delinearization.cpp
DemandedBits.cpp
DependenceAnalysis.cpp
DependenceGraphBuilder.cpp
DivergenceAnalysis.cpp
DominanceFrontier.cpp
DomPrinter.cpp
DomTreeUpdater.cpp
EHPersonalities.cpp
GlobalsModRef.cpp
GuardUtils.cpp
HeatUtils.cpp
IndirectCallPromotionAnalysis.cpp
InlineAdvisor.cpp Revert "Revert "[llvm][NFC] Cleanup uses of std::function in Inlining-related APIs"" 2020-05-15 12:29:16 -07:00
InlineCost.cpp Revert "Revert "[llvm][NFC] Cleanup uses of std::function in Inlining-related APIs"" 2020-05-15 12:29:16 -07:00
InstCount.cpp
InstructionPrecedenceTracking.cpp
InstructionSimplify.cpp Reapply [InstSimplify] Remove known bits constant folding 2020-05-08 10:24:53 +02:00
Interval.cpp
IntervalPartition.cpp
IVDescriptors.cpp
IVUsers.cpp
LazyBlockFrequencyInfo.cpp
LazyBranchProbabilityInfo.cpp
LazyCallGraph.cpp
LazyValueInfo.cpp [LVI] Don't use dominator tree in isValidAssumeForContext() 2020-05-17 21:39:35 +02:00
LegacyDivergenceAnalysis.cpp
Lint.cpp [IR] Revert r119493 2020-05-19 13:17:11 +01:00
LLVMBuild.txt
Loads.cpp [Loads] Require Align in isSafeToLoadUnconditionally() (NFC) 2020-05-18 20:50:35 +02:00
LoopAccessAnalysis.cpp [LAA] Move runtime-check generation to Transforms/Utils/loopUtils (NFC) 2020-05-10 17:39:26 +01:00
LoopAnalysisManager.cpp
LoopCacheAnalysis.cpp
LoopInfo.cpp
LoopNestAnalysis.cpp
LoopPass.cpp
LoopUnrollAnalyzer.cpp
MemDepPrinter.cpp
MemDerefPrinter.cpp
MemoryBuiltins.cpp [NFC] Rename *ByValOrInalloca* to *PassPointeeByValue* 2020-04-30 09:42:13 -07:00
MemoryDependenceAnalysis.cpp
MemoryLocation.cpp
MemorySSA.cpp [MemorySSA] Pass DT to the upward iterator for proper PhiTranslation. 2020-04-29 14:28:31 -07:00
MemorySSAUpdater.cpp
ModuleDebugInfoPrinter.cpp
ModuleSummaryAnalysis.cpp [IR] Replace all uses of CallBase::getCalledValue() with getCalledOperand(). 2020-04-27 22:17:03 -07:00
MustExecute.cpp MustBeExecutedContextPrinter::runOnModule: Use unique_ptr to simplify/clarify ownership 2020-04-28 11:30:53 -07:00
ObjCARCAliasAnalysis.cpp [Pass] Ensure we don't include PassSupport.h or PassAnalysisSupport.h directly 2020-04-26 12:58:20 +01:00
ObjCARCAnalysisUtils.cpp
ObjCARCInstKind.cpp [llvm][NFC][CallSite] Remove remaining {Immutable}CallSite uses 2020-04-23 22:19:39 -07:00
OptimizationRemarkEmitter.cpp [BPI][NFC] Reuse post dominantor tree from analysis manager when available 2020-04-30 11:31:03 +07:00
OrderedInstructions.cpp
PHITransAddr.cpp
PhiValues.cpp
PostDominators.cpp
ProfileSummaryInfo.cpp [SampleFDO] For functions without profiles, provide an option to put 2020-05-08 11:18:09 -07:00
PtrUseVisitor.cpp
README.txt
RegionInfo.cpp
RegionPass.cpp
RegionPrinter.cpp
ScalarEvolution.cpp [SVE] Remove calls to VectorType::isScalable from analysis 2020-04-23 12:44:22 -07:00
ScalarEvolutionAliasAnalysis.cpp
ScalarEvolutionExpander.cpp [NFC][CostModel] Add TargetCostKind to relevant APIs 2020-05-05 10:35:54 +01:00
ScalarEvolutionNormalization.cpp
ScopedNoAliasAA.cpp
StackSafetyAnalysis.cpp [NFC,StackSafety] Rename local function 2020-05-15 13:39:07 -07:00
StratifiedSets.h
SyncDependenceAnalysis.cpp
SyntheticCountsUtils.cpp
TargetLibraryInfo.cpp
TargetTransformInfo.cpp [NFC] Replace MaybeAlign with Align in TargetTransformInfo. 2020-05-18 19:25:49 -07:00
Trace.cpp
TypeBasedAliasAnalysis.cpp
TypeMetadataUtils.cpp [llvm][NFC][CallSite] Remove CallSite from TypeMetadataUtils & related 2020-04-23 08:23:16 -07:00
ValueLattice.cpp
ValueLatticeUtils.cpp
ValueTracking.cpp [ValueTracking] Fix computeKnownBits() with bitwidth-changing ptrtoint 2020-05-16 14:17:11 +02:00
VectorUtils.cpp [Alignment] Remove unnecessary getValueOrABITypeAlignment calls (NFC) 2020-05-17 22:19:15 +02: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))

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