llvm-6502/include/llvm/Analysis
Cameron Zwarich 8252ad1351 Speed up dominator computation some more by optimizing bucket processing. When
naively implemented, the Lengauer-Tarjan algorithm requires a separate bucket
for each vertex. However, this is unnecessary, because each vertex is only
placed into a single bucket (that of its semidominator), and each vertex's
bucket is processed before it is added to any bucket itself.

Instead of using a bucket per vertex, we use a single array Buckets that has two
purposes. Before the vertex V with DFS number i is processed, Buckets[i] stores
the index of the first element in V's bucket. After V's bucket is processed,
Buckets[i] stores the index of the next element in the bucket to which V now
belongs, if any.

Reading from the buckets can also be optimized. Instead of processing the bucket
of V's parent at the end of processing V, we process the bucket of V itself at
the beginning of processing V. This means that the case of the root vertex can
be simplified somewhat. It also means that we don't need to look up the DFS
number of the semidominator of every node in the bucket we are processing,
since we know it is the current index being processed.

This is a 6.5% speedup running -domtree on test-suite + SPEC2000/2006, with
larger speedups of around 12% on the larger benchmarks like GCC.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122680 91177308-0d34-0410-b5e6-96231b3b80d8
2011-01-02 07:03:00 +00:00
..
AliasAnalysis.h Introduce a new PartialAlias response for AliasAnalysis. For most 2010-12-10 19:38:58 +00:00
AliasSetTracker.h Reapply r116831 and r116839, converting AliasAnalysis to use 2010-10-19 22:54:46 +00:00
CallGraph.h Merge System into Support. 2010-11-29 18:16:10 +00:00
CaptureTracking.h 80-columns 2010-07-13 05:50:08 +00:00
CFGPrinter.h Remove tab characters and 80-col. 2010-07-12 05:26:37 +00:00
CodeMetrics.h Start separating out code metrics into code size metrics and code performance metrics. Partial Specialization will apply the former to function specializations, and the latter to all callsites that can use a specialization, in order to decide whether to create a specialization 2010-10-08 13:57:31 +00:00
ConstantFolding.h Clarify that constant folding of instructions applies when all operands 2010-11-23 10:16:18 +00:00
ConstantsScanner.h eliminate all 80-col violations that I have introduced in my recent checkins (and some others more) 2009-08-27 23:44:33 +00:00
DebugInfo.h Add support to create class type. 2010-12-08 20:18:20 +00:00
DIBuilder.h Add support to create debug info for functions and methods. 2010-12-08 20:42:44 +00:00
DominatorInternals.h Speed up dominator computation some more by optimizing bucket processing. When 2011-01-02 07:03:00 +00:00
Dominators.h Speed up dominator computation some more by optimizing bucket processing. When 2011-01-02 07:03:00 +00:00
DomPrinter.h add function passes for printing various dominator datastructures 2009-10-18 04:10:40 +00:00
DOTGraphTraitsPass.h Remove WriteGraph's Name argument, which it didn't use, and 2010-09-27 15:34:19 +00:00
FindUsedTypes.h Get rid of static constructors for pass registration. Instead, every pass exposes an initializeMyPassFunction(), which 2010-10-19 17:21:58 +00:00
InlineCost.h Now using a variant of the existing inlining heuristics to decide whether to create a given specialization of a function in PartialSpecialization. If the total performance bonus across all callsites passing the same constant exceeds the specialization cost, we create the specialization. 2010-10-09 22:06:36 +00:00
InstructionSimplify.h Clarify that InstructionSimplify only returns values that dominate the 2010-12-28 18:01:19 +00:00
Interval.h Change Pass::print to take a raw ostream instead of std::ostream, 2009-08-23 06:03:38 +00:00
IntervalIterator.h Use std::vector rather than SmallVector here because SmallVector 2010-07-08 13:06:08 +00:00
IntervalPartition.h Get rid of static constructors for pass registration. Instead, every pass exposes an initializeMyPassFunction(), which 2010-10-19 17:21:58 +00:00
IVUsers.h Revert 112442 and 112440 until the compile time problems introduced 2010-09-01 01:45:53 +00:00
LazyValueInfo.h Get rid of static constructors for pass registration. Instead, every pass exposes an initializeMyPassFunction(), which 2010-10-19 17:21:58 +00:00
LibCallAliasAnalysis.h Get rid of static constructors for pass registration. Instead, every pass exposes an initializeMyPassFunction(), which 2010-10-19 17:21:58 +00:00
LibCallSemantics.h Remove the experimental AliasAnalysis::getDependency interface, which 2010-09-14 21:25:10 +00:00
Lint.h Fix Lint printing warnings multiple times. Remove the ErrorStr 2010-05-26 22:28:53 +00:00
LiveValues.h remove redundant foward declaration. This function is already in 2009-11-11 00:21:21 +00:00
Loads.h Move FindAvailableLoadedValue isSafeToLoadUnconditionally out of 2010-05-28 16:19:17 +00:00
LoopDependenceAnalysis.h Get rid of static constructors for pass registration. Instead, every pass exposes an initializeMyPassFunction(), which 2010-10-19 17:21:58 +00:00
LoopInfo.h Small optimization to speed up replacementPreservesLCSSAForm. 2010-12-28 18:00:24 +00:00
LoopPass.h Make LoopPass::getContainedPass return a LoopPass* instead of a Pass* 2010-08-11 20:34:43 +00:00
MemoryBuiltins.h clean up handling of 'free', detangling it from everything else. 2010-11-30 01:28:33 +00:00
MemoryDependenceAnalysis.h Rewrite the main DSE loop to be written in terms of reasoning 2010-11-30 07:23:21 +00:00
Passes.h Move NoAA out of BasicAliasAnalysis.cpp into its own file, now that 2010-10-19 23:09:08 +00:00
PHITransAddr.h Reapply r97010, the speculative revert failed. 2010-02-24 08:48:04 +00:00
PostDominators.h Get rid of static constructors for pass registration. Instead, every pass exposes an initializeMyPassFunction(), which 2010-10-19 17:21:58 +00:00
ProfileInfo.h Convert debug messages to use dbgs(). Generally this means 2009-12-23 17:55:11 +00:00
ProfileInfoLoader.h Reapplied r81355 with the problems fixed. 2009-09-16 11:35:50 +00:00
ProfileInfoTypes.h OptimalEdgeProfiling: Creation of profiles. 2009-09-01 19:03:44 +00:00
RegionInfo.h Remove noisy semicolon. 2010-10-13 15:55:12 +00:00
RegionIterator.h Add new RegionInfo pass. 2010-07-22 07:46:31 +00:00
RegionPass.h Add RegionPass support. 2010-10-20 01:54:44 +00:00
RegionPrinter.h Add new RegionInfo pass. 2010-07-22 07:46:31 +00:00
ScalarEvolution.h implement enough of the memset inference algorithm to recognize and insert 2010-12-26 23:42:51 +00:00
ScalarEvolutionExpander.h Introduce memoization for ScalarEvolution dominates and properlyDominates 2010-11-18 00:34:22 +00:00
ScalarEvolutionExpressions.h Make SCEV::getType() and SCEV::print non-virtual. Move SCEV::hasOperand 2010-11-17 22:27:42 +00:00
ScalarEvolutionNormalization.h Generalize IVUsers to track arbitrary expressions rather than expressions 2010-04-07 22:27:08 +00:00
SparsePropagation.h Eliminate unnecessary LLVMContexts. 2009-12-18 23:42:08 +00:00
Trace.h eliminate the "Value" printing methods that print to a std::ostream. 2009-08-23 04:37:46 +00:00
ValueTracking.h move isBytewiseValue out to ValueTracking.h/cpp 2010-12-26 20:15:01 +00:00
Verifier.h Fix a comment. 2010-04-08 17:41:04 +00:00