1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00
llvm-mirror/include/llvm/Analysis
Chandler Carruth d7fd660b9a [LCG] Switch one of the update methods for the LazyCallGraph to support
limited batch updates.

Specifically, allow removing multiple reference edges starting from
a common source node. There are a few constraints that play into
supporting this form of batching:

1) The way updates occur during the CGSCC walk, about the most we can
   functionally batch together are those with a common source node. This
   also makes the batching simpler to implement, so it seems
   a worthwhile restriction.
2) The far and away hottest function for large C++ files I measured
   (generated code for protocol buffers) showed a huge amount of time
   was spent removing ref edges specifically, so it seems worth focusing
   there.
3) The algorithm for removing ref edges is very amenable to this
   restricted batching. There are just both API and implementation
   special casing for the non-batch case that gets in the way. Once
   removed, supporting batches is nearly trivial.

This does modify the API in an interesting way -- now, we only preserve
the target RefSCC when the RefSCC structure is unchanged. In the face of
any splits, we create brand new RefSCC objects. However, all of the
users were OK with it that I could find. Only the unittest needed
interesting updates here.

How much does batching these updates help? I instrumented the compiler
when run over a very large generated source file for a protocol buffer
and found that the majority of updates are intrinsically updating one
function at a time. However, nearly 40% of the total ref edges removed
are removed as part of a batch of removals greater than one, so these
are the cases batching can help with.

When compiling the IR for this file with 'opt' and 'O3', this patch
reduces the total time by 8-9%.

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

llvm-svn: 310450
2017-08-09 09:05:27 +00:00
..
AliasAnalysis.h Allow None as a MemoryLocation to getModRefInfo 2017-08-01 00:28:29 +00:00
AliasAnalysisEvaluator.h Consistently use FunctionAnalysisManager 2016-08-09 00:28:15 +00:00
AliasSetTracker.h [Analysis] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-07-24 23:16:33 +00:00
AssumptionCache.h Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
BasicAliasAnalysis.h Revert r307581, "Avoid doing conservative phi checks in aliasSameBasePointerGEPs() if no phis have been visited yet." 2017-07-11 02:31:51 +00:00
BlockFrequencyInfo.h [Analysis] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-07-21 21:37:46 +00:00
BlockFrequencyInfoImpl.h [Analysis] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-07-21 21:37:46 +00:00
BranchProbabilityInfo.h [Analysis] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-07-21 21:37:46 +00:00
CallGraph.h [Analysis] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-07-24 23:16:33 +00:00
CallGraphSCCPass.h [CallGraphSCCPass] Use an ArrayRef instead of a pair of iterators 2016-08-06 06:21:02 +00:00
CallPrinter.h [CG] Rename the DOT printing pass to actually reference "DOT". 2016-03-10 11:04:40 +00:00
CaptureTracking.h [CaptureTracker] Provide an ordered basic block to PointerMayBeCapturedBefore 2015-07-31 14:31:35 +00:00
CFG.h Add some constantness to GetSuccessorNumber(). 2015-11-20 23:02:06 +00:00
CFGPrinter.h [IR] Redesign the case iterator in SwitchInst to actually be an iterator 2017-04-12 07:27:28 +00:00
CFLAliasAnalysisUtils.h [CFLAA] Move FunctionHandle to llvm::cflaa. 2017-06-27 02:43:00 +00:00
CFLAndersAliasAnalysis.h [CFLAA] Move FunctionHandle to llvm::cflaa. 2017-06-27 02:43:00 +00:00
CFLSteensAliasAnalysis.h [CFLAA] Move FunctionHandle to llvm::cflaa. 2017-06-27 02:43:00 +00:00
CGSCCPassManager.h [PM] Fix a bug where through CGSCC iteration we can get 2017-08-02 02:09:22 +00:00
CodeMetrics.h Revert @llvm.assume with operator bundles (r289755-r289757) 2016-12-19 08:22:17 +00:00
ConstantFolding.h [InstSimplify] Don't constant fold or DCE calls that are marked nobuiltin 2017-06-09 23:18:11 +00:00
DemandedBits.h [Analysis] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-07-21 21:37:46 +00:00
DependenceAnalysis.h [PM] Change the static object whose address is used to uniquely identify 2016-11-23 17:53:26 +00:00
DivergenceAnalysis.h [DivergenceAnalysis] Separated definition of class into header. 2015-09-21 17:58:14 +00:00
DominanceFrontier.h [Dominators] Change Roots type to SmallVector 2017-07-26 18:27:39 +00:00
DominanceFrontierImpl.h [Analysis] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-07-24 23:16:33 +00:00
DomPrinter.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
DOTGraphTraitsPass.h [DOTGraphTraits] Propagate Graph template argument, NFC 2017-07-24 12:55:00 +00:00
EHPersonalities.h [tsan] Add support for C++ exceptions into TSan (call __tsan_func_exit during unwinding), LLVM part 2016-11-14 21:41:13 +00:00
GlobalsModRef.h [PM] Change the static object whose address is used to uniquely identify 2016-11-23 17:53:26 +00:00
IndirectCallPromotionAnalysis.h Separate the ICP total threshold and remaining threshold. 2017-07-28 01:02:54 +00:00
IndirectCallSiteVisitor.h Fix the samplepgo indirect call promotion bug: we should not promote a direct call. 2017-02-06 23:33:15 +00:00
InlineCost.h [Inliner] Increase threshold for hot callsites without PGO. 2017-08-03 22:23:33 +00:00
InstructionSimplify.h [InstSimplify] Don't constant fold or DCE calls that are marked nobuiltin 2017-06-09 23:18:11 +00:00
Interval.h [Analysis] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-07-24 23:16:33 +00:00
IntervalIterator.h [Analysis] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-07-24 23:16:33 +00:00
IntervalPartition.h [Analysis] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-07-24 23:16:33 +00:00
IteratedDominanceFrontier.h [Dominators] Make IsPostDominator a template parameter 2017-07-14 18:26:09 +00:00
IVUsers.h Rename WeakVH to WeakTrackingVH; NFC 2017-05-01 17:07:49 +00:00
LazyBlockFrequencyInfo.h [LazyBFI] Fix typos 2017-02-14 17:21:12 +00:00
LazyBranchProbabilityInfo.h [BPI] Don't assume that strcmp returning >0 is more likely than <0 2017-06-08 09:44:40 +00:00
LazyCallGraph.h [LCG] Switch one of the update methods for the LazyCallGraph to support 2017-08-09 09:05:27 +00:00
LazyValueInfo.h [JumpThreading] Teach jump threading how to analyze (and (cmp A, C1), (cmp A, C2)) after InstCombine has turned it into (cmp (add A, C3), C4) 2017-06-23 05:41:35 +00:00
Lint.h Revert r240137 (Fixed/added namespace ending comments using clang-tidy. NFC) 2015-06-23 09:49:53 +00:00
Loads.h Make visible isDereferenceableAndAlignedPointer(..., const APInt &Size, ...) 2017-06-24 01:35:13 +00:00
LoopAccessAnalysis.h [SLP] Revert everything that has to do with memory access sorting. 2017-03-10 18:59:07 +00:00
LoopAnalysisManager.h Revert r293017 and fix the actual underlying issue. 2017-02-07 01:50:48 +00:00
LoopInfo.h [Dominators] Make IsPostDominator a template parameter 2017-07-14 18:26:09 +00:00
LoopInfoImpl.h [Dominators] Make IsPostDominator a template parameter 2017-07-14 18:26:09 +00:00
LoopIterator.h [Analysis] Revert r306472 changes in LoopInfo headers to fix broken builds. 2017-06-27 22:20:38 +00:00
LoopPass.h [LegacyPM] Make the 'addLoop' method accept a loop to add rather than 2017-05-25 03:01:31 +00:00
LoopUnrollAnalyzer.h Revert "Revert "[Unroll] Implement a conservative and monotonically increasing cost tracking system during the full unroll heuristic analysis that avoids counting any instruction cost until that instruction becomes "live" through a side-effect or use outside the..."" 2016-05-13 21:23:25 +00:00
MemoryBuiltins.h [MemoryBuiltins] Allow truncation in visitAllocaInst() 2017-07-12 06:19:10 +00:00
MemoryDependenceAnalysis.h Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
MemoryLocation.h Allow None as a MemoryLocation to getModRefInfo 2017-08-01 00:28:29 +00:00
MemorySSA.h Remove inline keyword from inline classof methods 2017-06-29 19:35:17 +00:00
MemorySSAUpdater.h Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
ModuleSummaryAnalysis.h [PM] Change the static object whose address is used to uniquely identify 2016-11-23 17:53:26 +00:00
ObjCARCAliasAnalysis.h [PM] Extend the explicit 'invalidate' method API on analysis results to 2016-11-28 22:04:31 +00:00
ObjCARCAnalysisUtils.h Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
ObjCARCInstKind.h Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
ObjectUtils.h Move llvm::canBeOmittedFromSymbolTable() to Analysis. 2017-03-31 04:46:31 +00:00
OptimizationDiagnosticInfo.h [ORE] Unify spelling as "diagnostics hotness" 2017-06-30 18:13:59 +00:00
OrderedBasicBlock.h Revert "Make OrderedInstructions and OrderedBasicBlock use AssertingVH, to try and catch mistakes" 2017-06-28 22:35:54 +00:00
Passes.h [PM] Port of the DepndenceAnalysis to the new PM. 2016-05-12 22:19:39 +00:00
PHITransAddr.h Revert @llvm.assume with operator bundles (r289755-r289757) 2016-12-19 08:22:17 +00:00
PostDominators.h [Dominators] Make IsPostDominator a template parameter 2017-07-14 18:26:09 +00:00
ProfileSummaryInfo.h Use profile summary to disable peeling for huge working sets 2017-08-03 23:42:58 +00:00
PtrUseVisitor.h [IR/Analysis] Defend against getting slightly wrong template arguments 2017-02-07 03:17:30 +00:00
RegionInfo.h [Analysis] Fix some Clang-tidy modernize-use-using and Include What You Use warnings; other minor fixes (NFC). 2017-06-27 21:52:05 +00:00
RegionInfoImpl.h Remove unneeded use of #undef DEBUG_TYPE. NFC 2017-07-12 20:49:21 +00:00
RegionIterator.h Test commit 2017-06-29 09:46:01 +00:00
RegionPass.h Add opt-bisect support for region passes. 2017-06-01 21:22:26 +00:00
RegionPrinter.h [RegionInfo] Add debug-time region viewer functions 2015-08-10 13:21:59 +00:00
ScalarEvolution.h [SCEV] Re-enable "Cache results of computeExitLimit" 2017-08-03 08:41:30 +00:00
ScalarEvolutionAliasAnalysis.h [PM] Change the static object whose address is used to uniquely identify 2016-11-23 17:53:26 +00:00
ScalarEvolutionExpander.h Rename WeakVH to WeakTrackingVH; NFC 2017-05-01 17:07:49 +00:00
ScalarEvolutionExpressions.h Remove inline keyword from inline classof methods 2017-06-29 19:35:17 +00:00
ScalarEvolutionNormalization.h Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
ScopedNoAliasAA.h [PM] Extend the explicit 'invalidate' method API on analysis results to 2016-11-28 22:04:31 +00:00
SparsePropagation.h Make more headers self-contained. 2016-01-27 18:03:37 +00:00
TargetFolder.h [ConstnatFolding] Teach the folder how to fold ConstantVector 2016-07-29 03:27:26 +00:00
TargetLibraryInfo.def Revert "Add pthread_self function prototype and make it speculatable." 2017-05-21 00:37:55 +00:00
TargetLibraryInfo.h fix formatting; NFC 2017-06-08 20:00:09 +00:00
TargetTransformInfo.h [Cost] Rename getReductionCost() to getArithmeticReductionCost(), NFC. 2017-07-31 14:19:32 +00:00
TargetTransformInfoImpl.h Fix typo in comment 2017-08-07 14:58:43 +00:00
Trace.h [Analysis] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-07-21 21:37:46 +00:00
TypeBasedAliasAnalysis.h [PM] Extend the explicit 'invalidate' method API on analysis results to 2016-11-28 22:04:31 +00:00
TypeMetadataUtils.h [cfi] CFI-ICall for ThinLTO. 2017-06-16 00:18:29 +00:00
ValueTracking.h [Value Tracking] Default argument to true and rename accordingly. NFC. 2017-08-01 20:18:54 +00:00
VectorUtils.h [LV] Move interleaved access helper functions to VectorUtils (NFC) 2017-02-01 17:45:46 +00:00