1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 03:23:01 +02:00
llvm-mirror/lib/Analysis
Tim Shen 4df0ad8244 [ADT] NFC: Generalize GraphTraits requirement of "NodeType *" in interfaces to "NodeRef", and migrate SCCIterator.h to use NodeRef
Summary: By generalize the interface, users are able to inject more flexible Node token into the algorithm, for example, a pair of vector<Node>* and index integer. Currently I only migrated SCCIterator to use NodeRef, but more is coming. It's a NFC.

Reviewers: dblaikie, chandlerc

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D22937

llvm-svn: 277399
2016-08-01 22:32:20 +00:00
..
AliasAnalysis.cpp [AliasAnalysis] Give back AA results for fence instructions 2016-07-15 17:19:24 +00:00
AliasAnalysisEvaluator.cpp Apply clang-tidy's modernize-loop-convert to lib/Analysis. 2016-06-26 17:27:42 +00:00
AliasAnalysisSummary.cpp [CFLAA] Add more offset-sensitivity tracking. 2016-07-22 22:30:48 +00:00
AliasAnalysisSummary.h [CFLAA] Add more offset-sensitivity tracking. 2016-07-22 22:30:48 +00:00
AliasSetTracker.cpp Apply clang-tidy's modernize-loop-convert to lib/Analysis. 2016-06-26 17:27:42 +00:00
Analysis.cpp [BPI] Add new LazyBPI analysis 2016-07-28 23:31:12 +00:00
AssumptionCache.cpp
BasicAliasAnalysis.cpp BasicAA should look through functions with returned arguments 2016-07-11 01:32:20 +00:00
BlockFrequencyInfo.cpp Revert r277313 and r277314. 2016-08-01 04:16:09 +00:00
BlockFrequencyInfoImpl.cpp [ADT] NFC: Generalize GraphTraits requirement of "NodeType *" in interfaces to "NodeRef", and migrate SCCIterator.h to use NodeRef 2016-08-01 22:32:20 +00:00
BranchProbabilityInfo.cpp Re-submit r272891 "Prevent dangling pointer problems in BranchProbabilityInfo" 2016-07-15 14:31:16 +00:00
CallGraph.cpp Apply clang-tidy's modernize-loop-convert to lib/Analysis. 2016-06-26 17:27:42 +00:00
CallGraphSCCPass.cpp Apply clang-tidy's modernize-loop-convert to lib/Analysis. 2016-06-26 17:27:42 +00:00
CallPrinter.cpp
CaptureTracking.cpp
CFG.cpp
CFGPrinter.cpp
CFLAndersAliasAnalysis.cpp [CFLAA] Remove modref queries from CFLAA. 2016-08-01 18:47:28 +00:00
CFLGraph.h [CFLAA] Check for pointer types in more places. 2016-07-29 01:23:45 +00:00
CFLSteensAliasAnalysis.cpp [CFLAA] Remove modref queries from CFLAA. 2016-08-01 18:47:28 +00:00
CGSCCPassManager.cpp
CMakeLists.txt [BPI] Add new LazyBPI analysis 2016-07-28 23:31:12 +00:00
CodeMetrics.cpp
ConstantFolding.cpp [ConstantFolding] Handle bitcasts of undef fp vector elements 2016-07-29 18:48:27 +00:00
CostModel.cpp Apply clang-tidy's modernize-loop-convert to lib/Analysis. 2016-06-26 17:27:42 +00:00
Delinearization.cpp
DemandedBits.cpp [DemandedBits] Reduce number of duplicated DenseMap lookups. 2016-07-21 13:37:55 +00:00
DependenceAnalysis.cpp Apply clang-tidy's modernize-loop-convert to lib/Analysis. 2016-06-26 17:27:42 +00:00
DivergenceAnalysis.cpp
DominanceFrontier.cpp
DomPrinter.cpp
EHPersonalities.cpp
GlobalsModRef.cpp GlobalsAA: Functions with the argmemonly attribute won't read arbitrary globals 2016-07-14 15:50:27 +00:00
IndirectCallPromotionAnalysis.cpp Remove another unused variable from r275216 2016-07-12 23:49:17 +00:00
InlineCost.cpp Avoid using a raw AssumptionCacheTracker in various inliner functions. 2016-07-23 04:22:50 +00:00
InstCount.cpp
InstructionSimplify.cpp [InstSimplify] Cast folding can be made more generic 2016-07-26 17:58:05 +00:00
Interval.cpp Apply clang-tidy's modernize-loop-convert to lib/Analysis. 2016-06-26 17:27:42 +00:00
IntervalPartition.cpp Apply clang-tidy's modernize-loop-convert to lib/Analysis. 2016-06-26 17:27:42 +00:00
IteratedDominanceFrontier.cpp Normalize file docs. NFC. 2016-07-21 20:52:35 +00:00
IVUsers.cpp [PM] Convert IVUsers analysis to new pass manager. 2016-07-16 22:51:33 +00:00
LazyBlockFrequencyInfo.cpp [BPI] Add new LazyBPI analysis 2016-07-28 23:31:12 +00:00
LazyBranchProbabilityInfo.cpp [BPI] Add new LazyBPI analysis 2016-07-28 23:31:12 +00:00
LazyCallGraph.cpp [LCG] Hoist the definitions of the stream operator friends to be inline 2016-07-07 07:52:07 +00:00
LazyValueInfo.cpp [LVI] Use DenseMap::find_as in LazyValueInfo. 2016-07-27 22:33:36 +00:00
Lint.cpp [ConstnatFolding] Teach the folder how to fold ConstantVector 2016-07-29 03:27:26 +00:00
LLVMBuild.txt Refactor indirect call promotion profitability analysis (NFC) 2016-07-12 21:13:44 +00:00
Loads.cpp Teach isDereferenceablePointer to look through returned-argument functions 2016-07-11 03:08:49 +00:00
LoopAccessAnalysis.cpp [OptDiag,LV] Add hotness attribute to analysis remarks 2016-07-20 21:44:26 +00:00
LoopInfo.cpp add a verbose mode to Loop->print() to print all the basic blocks of a loop 2016-07-27 05:02:17 +00:00
LoopPass.cpp [LoopPass] Some minor cleanups 2016-07-19 17:50:24 +00:00
LoopPassManager.cpp
LoopUnrollAnalyzer.cpp [LoopUnrollAnalyzer] Handle out of bounds accesses in visitLoad 2016-07-23 02:56:49 +00:00
MemDepPrinter.cpp Apply clang-tidy's modernize-loop-convert to lib/Analysis. 2016-06-26 17:27:42 +00:00
MemDerefPrinter.cpp
MemoryBuiltins.cpp fix formatting; NFC 2016-07-07 16:19:09 +00:00
MemoryDependenceAnalysis.cpp Typos. NFC. 2016-06-28 17:19:10 +00:00
MemoryLocation.cpp
ModuleDebugInfoPrinter.cpp
ModuleSummaryAnalysis.cpp [ThinLTO] Perform profile-guided indirect call promotion 2016-07-17 14:47:01 +00:00
ObjCARCAliasAnalysis.cpp
ObjCARCAnalysisUtils.cpp
ObjCARCInstKind.cpp
OptimizationDiagnosticInfo.cpp [OptDiag] Missed these when making the IR Value a const pointer 2016-07-21 01:11:12 +00:00
OrderedBasicBlock.cpp
PHITransAddr.cpp
PostDominators.cpp [PM] Remove support for omitting the AnalysisManager argument to new 2016-06-17 00:11:01 +00:00
ProfileSummaryInfo.cpp [PM] Remove support for omitting the AnalysisManager argument to new 2016-06-17 00:11:01 +00:00
PtrUseVisitor.cpp
README.txt
RegionInfo.cpp
RegionPass.cpp [RegionPass] Some minor cleanups 2016-07-19 17:50:27 +00:00
RegionPrinter.cpp Apply clang-tidy's modernize-loop-convert to lib/Analysis. 2016-06-26 17:27:42 +00:00
ScalarEvolution.cpp Revert r276136 "Use ValueOffsetPair to enhance value reuse during SCEV expansion." 2016-07-26 23:25:13 +00:00
ScalarEvolutionAliasAnalysis.cpp
ScalarEvolutionExpander.cpp Revert r276136 "Use ValueOffsetPair to enhance value reuse during SCEV expansion." 2016-07-26 23:25:13 +00:00
ScalarEvolutionNormalization.cpp
ScopedNoAliasAA.cpp
SparsePropagation.cpp Apply clang-tidy's modernize-loop-convert to lib/Analysis. 2016-06-26 17:27:42 +00:00
StratifiedSets.h [CFLAA] Simplify CFLGraphBuilder. NFC. 2016-07-11 22:59:09 +00:00
TargetLibraryInfo.cpp Recommitting r275284: add support to inline __builtin_mempcpy 2016-07-29 18:23:18 +00:00
TargetTransformInfo.cpp This implements a more optimal algorithm for selecting a base constant in 2016-07-14 07:44:20 +00:00
Trace.cpp
TypeBasedAliasAnalysis.cpp
TypeMetadataUtils.cpp [IR] Make getIndexedOffsetInType return a signed result 2016-07-13 03:42:38 +00:00
ValueTracking.cpp [ValueTracking] Use Instruction::getFunction; NFC 2016-07-14 20:19:01 +00:00
VectorUtils.cpp SLPVectorizer: Move propagateMetadata to VectorUtils 2016-06-30 21:17:59 +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))

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