1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00
llvm-mirror/lib/Analysis
Philip Reames 0e2498cde5 [InstSimplify] Move masked.gather w/no active lanes handling to InstSimplify from InstCombine
In the process, use the existing masked.load combine which is slightly stronger, and handles a mix of zero and undef elements in the mask.  

llvm-svn: 358913
2019-04-22 19:30:01 +00:00
..
AliasAnalysis.cpp
AliasAnalysisEvaluator.cpp
AliasAnalysisSummary.cpp
AliasAnalysisSummary.h
AliasSetTracker.cpp
Analysis.cpp
AssumptionCache.cpp
BasicAliasAnalysis.cpp
BlockFrequencyInfo.cpp
BlockFrequencyInfoImpl.cpp
BranchProbabilityInfo.cpp
CallGraph.cpp [CallSite removal] Move the legacy PM, call graph, and some inliner 2019-04-19 05:59:42 +00:00
CallGraphSCCPass.cpp [CallSite removal] Move the legacy PM, call graph, and some inliner 2019-04-19 05:59:42 +00:00
CallPrinter.cpp
CaptureTracking.cpp
CFG.cpp
CFGPrinter.cpp
CFLAndersAliasAnalysis.cpp
CFLGraph.h
CFLSteensAliasAnalysis.cpp
CGSCCPassManager.cpp
CMakeLists.txt
CmpInstAnalysis.cpp
CodeMetrics.cpp
ConstantFolding.cpp
CostModel.cpp
Delinearization.cpp
DemandedBits.cpp
DependenceAnalysis.cpp
DivergenceAnalysis.cpp
DominanceFrontier.cpp
DomPrinter.cpp
DomTreeUpdater.cpp
EHPersonalities.cpp
GlobalsModRef.cpp
GuardUtils.cpp
IndirectCallPromotionAnalysis.cpp
InlineCost.cpp
InstCount.cpp
InstructionPrecedenceTracking.cpp
InstructionSimplify.cpp [InstSimplify] Move masked.gather w/no active lanes handling to InstSimplify from InstCombine 2019-04-22 19:30:01 +00:00
Interval.cpp
IntervalPartition.cpp
IteratedDominanceFrontier.cpp
IVDescriptors.cpp
IVUsers.cpp
LazyBlockFrequencyInfo.cpp
LazyBranchProbabilityInfo.cpp
LazyCallGraph.cpp
LazyValueInfo.cpp Revert "[ConstantRange] Rename make{Guaranteed -> Exact}NoWrapRegion() NFC" 2019-04-22 09:01:38 +00:00
LegacyDivergenceAnalysis.cpp
Lint.cpp
LLVMBuild.txt
Loads.cpp
LoopAccessAnalysis.cpp
LoopAnalysisManager.cpp
LoopInfo.cpp
LoopPass.cpp
LoopUnrollAnalyzer.cpp
MemDepPrinter.cpp
MemDerefPrinter.cpp
MemoryBuiltins.cpp Fix a hang when lowering __builtin_dynamic_object_size 2019-04-10 23:42:11 +00:00
MemoryDependenceAnalysis.cpp
MemoryLocation.cpp
MemorySSA.cpp [MemorySSA] Small fix for the clobber limit. 2019-04-12 18:48:46 +00:00
MemorySSAUpdater.cpp [MemorySSA] Add previous def to cache when found, even if trivial. 2019-04-12 21:58:52 +00:00
ModuleDebugInfoPrinter.cpp
ModuleSummaryAnalysis.cpp
MustExecute.cpp
ObjCARCAliasAnalysis.cpp
ObjCARCAnalysisUtils.cpp
ObjCARCInstKind.cpp
OptimizationRemarkEmitter.cpp
OrderedBasicBlock.cpp
OrderedInstructions.cpp
PHITransAddr.cpp
PhiValues.cpp
PostDominators.cpp
ProfileSummaryInfo.cpp
PtrUseVisitor.cpp
README.txt
RegionInfo.cpp
RegionPass.cpp
RegionPrinter.cpp
ScalarEvolution.cpp Revert "[ConstantRange] Rename make{Guaranteed -> Exact}NoWrapRegion() NFC" 2019-04-22 09:01:38 +00:00
ScalarEvolutionAliasAnalysis.cpp
ScalarEvolutionExpander.cpp Fix a bug in SCEV's isSafeToExpand around speculation safety 2019-04-18 16:10:21 +00:00
ScalarEvolutionNormalization.cpp
ScopedNoAliasAA.cpp
StackSafetyAnalysis.cpp
StratifiedSets.h
SyncDependenceAnalysis.cpp [SDA] Bug fix: Use IPD outside the loop as divergence bound 2019-04-18 16:17:35 +00:00
SyntheticCountsUtils.cpp
TargetLibraryInfo.cpp Use llvm::lower_bound. NFC 2019-04-12 02:02:06 +00:00
TargetTransformInfo.cpp
Trace.cpp
TypeBasedAliasAnalysis.cpp
TypeMetadataUtils.cpp
ValueLattice.cpp
ValueLatticeUtils.cpp
ValueTracking.cpp [ConstantRange] Add getNonEmpty() constructor 2019-04-21 15:22:54 +00:00
VectorUtils.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))

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