1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 02:52:53 +02:00
llvm-mirror/lib/Analysis
Francesco Petrogalli a6a7edd0c0 [VectorUtils] API for VFShape, update VFInfo.
Summary:
This patch introduces an API to build and modify vector shapes.

The validity of a VFShape can be checked with the
`hasValidParameterList` method, which is also run in an assertion each
time a VFShape is modified.

The field VFISAKind has been moved to VFInfo under the assumption that
different ISAs can map to the same VFShape (as it can be in the case
of vector extensions with the same registers size, for example AVX and
AVX2).

Reviewers: sdesmalen, jdoerfert, simoll, hsaito

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D70513
2019-12-04 20:40:05 +00:00
..
AliasAnalysis.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
AliasAnalysisEvaluator.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
AliasAnalysisSummary.cpp Move CFLGraph and the AA summary code over to the new CallBase 2019-02-11 09:25:41 +00:00
AliasAnalysisSummary.h Move CFLGraph and the AA summary code over to the new CallBase 2019-02-11 09:25:41 +00:00
AliasSetTracker.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
Analysis.cpp [MustExec] Add a generic "must-be-executed-context" explorer 2019-08-23 15:17:27 +00:00
AssumptionCache.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
BasicAliasAnalysis.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
BlockFrequencyInfo.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
BlockFrequencyInfoImpl.cpp Add optional arg to profile count getters to filter 2019-04-24 19:51:16 +00:00
BranchProbabilityInfo.cpp Reland "b19ec1eb3d0c [BPI] Improve unreachable/ColdCall heurstics to handle loops." 2019-12-02 10:28:40 -08:00
CallGraph.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
CallGraphSCCPass.cpp [CallSite removal] Move the legacy PM, call graph, and some inliner 2019-04-19 05:59:42 +00:00
CallPrinter.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
CaptureTracking.cpp [CaptureTracker] Let subclasses provide dereferenceability information 2019-08-19 21:56:38 +00:00
CFG.cpp Recommit "[GVN] Preserve loop related analysis/canonical forms." 2019-07-31 09:27:54 +00:00
CFGPrinter.cpp Add missing includes needed to prune LLVMContext.h include, NFC 2019-11-14 15:23:15 -08:00
CFLAndersAliasAnalysis.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
CFLGraph.h [CFLGraph] Add support for unary fneg instruction. 2019-06-06 19:21:23 +00:00
CFLSteensAliasAnalysis.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
CGSCCPassManager.cpp Revert "[CallGraph] Refine call graph for indirect calls with !callees metadata" 2019-08-16 10:59:18 +00:00
CMakeLists.txt [cmake] Explicitly mark libraries defined in lib/ as "Component Libraries" 2019-11-21 10:48:08 -08:00
CmpInstAnalysis.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CodeMetrics.cpp Remove CallSite from the CodeMetrics analysis, moving it to the new 2019-02-11 09:03:32 +00:00
ConstantFolding.cpp [ConstantFolding] Fold constant calls to log2() 2019-09-30 20:53:23 +00:00
CostModel.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
DDG.cpp [DDG] Data Dependence Graph - Topological Sort (Memory Leak Fix) 2019-12-03 10:08:25 -05:00
Delinearization.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
DemandedBits.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
DependenceAnalysis.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
DependenceGraphBuilder.cpp [DDG] Data Dependence Graph - Topological Sort (Memory Leak Fix) 2019-12-03 10:08:25 -05:00
DivergenceAnalysis.cpp [DivergenceAnalysis] Add methods for querying divergence at use 2019-07-29 10:22:09 +00:00
DominanceFrontier.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
DomPrinter.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
DomTreeUpdater.cpp [DTU] Refine the interface and logic of applyUpdates 2019-02-22 13:48:38 +00:00
EHPersonalities.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
GlobalsModRef.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
GuardUtils.cpp Slightly speculative buildbot fix for issue reported in 8293f74 commit thread 2019-11-22 11:37:17 -08:00
IndirectCallPromotionAnalysis.cpp Add missing includes needed to prune LLVMContext.h include, NFC 2019-11-14 15:23:15 -08:00
InlineCost.cpp [InlineCost] Fix infinite loop in indirect call evaluation 2019-11-28 08:27:50 +02:00
InstCount.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
InstructionPrecedenceTracking.cpp Add missing includes needed to prune LLVMContext.h include, NFC 2019-11-14 15:23:15 -08:00
InstructionSimplify.cpp [InstSimplify] fold copysign with same args to the arg 2019-11-26 17:35:10 -05:00
Interval.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
IntervalPartition.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
IVDescriptors.cpp [IVDescriptors] Skip FOR where we have multiple sink points for now. 2019-11-28 22:18:47 +01:00
IVUsers.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
LazyBlockFrequencyInfo.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
LazyBranchProbabilityInfo.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
LazyCallGraph.cpp Second attempt to add iterator_range::empty() 2019-10-07 18:14:24 +00:00
LazyValueInfo.cpp [LVI] Restructure caching 2019-12-04 17:49:33 +01:00
LegacyDivergenceAnalysis.cpp Add missing includes needed to prune LLVMContext.h include, NFC 2019-11-14 15:23:15 -08:00
Lint.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Loads.cpp [InstCombine] Skip scalable vectors in combineLoadToOperationType 2019-11-12 12:27:09 +01:00
LoopAccessAnalysis.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
LoopAnalysisManager.cpp [LoopPassManager + MemorySSA] Only enable use of MemorySSA for LPMs known to preserve it. 2019-08-21 17:00:57 +00:00
LoopCacheAnalysis.cpp [LoopCacheAnalysis]: Fix assertion failure during cost computation 2019-11-15 14:56:26 -05:00
LoopInfo.cpp [MemorySSA] Moving at the end often means before terminator. 2019-11-20 17:11:00 -08:00
LoopPass.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
LoopUnrollAnalyzer.cpp [InstSimplify] Rename SimplifyFPUnOp and SimplifyFPBinOp 2019-07-24 12:50:10 +00:00
MemDepPrinter.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
MemDerefPrinter.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
MemoryBuiltins.cpp [Alignment][NFC] Remove unneeded llvm:: scoping on Align types 2019-09-27 12:54:21 +00:00
MemoryDependenceAnalysis.cpp Revert "[DependenceAnalysis] Dependecies for loads marked with "ivnariant.load" should not be shared with general accesses. Fix for https://bugs.llvm.org/show_bug.cgi?id=42151" 2019-11-21 11:40:15 +01:00
MemoryLocation.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MemorySSA.cpp [MemorySSA] Combine verifications. 2019-11-25 16:05:38 -08:00
MemorySSAUpdater.cpp [MemorySSA] Moving at the end often means before terminator. 2019-11-20 17:11:00 -08:00
ModuleDebugInfoPrinter.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
ModuleSummaryAnalysis.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
MustExecute.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
ObjCARCAliasAnalysis.cpp [AliasAnalysis] Second prototype to cache BasicAA / anyAA state. 2019-03-22 17:22:19 +00:00
ObjCARCAnalysisUtils.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ObjCARCInstKind.cpp [ObjC][ARC] Delete ObjC runtime calls on global variables annotated 2019-06-14 22:06:32 +00:00
OptimizationRemarkEmitter.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
OrderedBasicBlock.cpp Recommit "[DSE] Preserve basic block ordering using OrderedBasicBlock." 2019-03-29 14:10:24 +00:00
OrderedInstructions.cpp [llvm] Migrate llvm::make_unique to std::make_unique 2019-08-15 15:54:37 +00:00
PHITransAddr.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PhiValues.cpp [PhiValues] Remove redundant map searches 2019-11-23 10:32:56 +02:00
PostDominators.cpp [CodeMoverUtils] Added an API to check if an instruction can be safely 2019-11-22 21:29:08 +00:00
ProfileSummaryInfo.cpp Add missing includes needed to prune LLVMContext.h include, NFC 2019-11-14 15:23:15 -08:00
PtrUseVisitor.cpp SROA: Allow eliminating addrspacecasted allocas 2019-06-14 21:38:31 +00:00
README.txt
RegionInfo.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
RegionPass.cpp [IR] Refactor attribute methods in Function class (NFC) 2019-04-04 22:40:06 +00:00
RegionPrinter.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
ScalarEvolution.cpp [NFC][KnownBits] Add getMinValue() / getMaxValue() methods 2019-12-03 20:04:51 +03:00
ScalarEvolutionAliasAnalysis.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
ScalarEvolutionExpander.cpp [SCEV] Removing deprecated comment in ScalarEvolutionExpander 2019-10-18 13:33:45 +00:00
ScalarEvolutionNormalization.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ScopedNoAliasAA.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
StackSafetyAnalysis.cpp Add missing includes needed to prune LLVMContext.h include, NFC 2019-11-14 15:23:15 -08:00
StratifiedSets.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
SyncDependenceAnalysis.cpp [SDA] Don't stop divergence propagation at the IPD. 2019-09-18 13:40:22 +00:00
SyntheticCountsUtils.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
TargetLibraryInfo.cpp [SVFS] Inject TLI Mappings in VFABI attribute. 2019-11-15 18:42:56 +00:00
TargetTransformInfo.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
Trace.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
TypeBasedAliasAnalysis.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
TypeMetadataUtils.cpp Reland: Dead Virtual Function Elimination 2019-10-17 09:58:57 +00:00
ValueLattice.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ValueLatticeUtils.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ValueTracking.cpp [NFC][KnownBits] Add getMinValue() / getMaxValue() methods 2019-12-03 20:04:51 +03:00
VectorUtils.cpp [VectorUtils] API for VFShape, update VFInfo. 2019-12-04 20:40:05 +00:00
VFABIDemangling.cpp [VectorUtils] API for VFShape, update VFInfo. 2019-12-04 20:40:05 +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))

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