llvm-6502/include/llvm
Daniel Berlin 5d6f997e0a Make updateDFSNumbers API public
Summary:
There are a number of passes that could be sped up by using dominator tree DFS numbers to order or compare things across multiple bbs
(MemorySSA, MergedLoadStoreMotion, EarlyCSE, Sinking, GVN, NewGVN, for starters :P).

For example, GVN/CSE elimination can be done with a simple stack/etc (instead of full-on scoped hash table or repeated leader set walks)
  if the DFS pair is stored next to leaders.

The dominator tree keeps them, and the DOM tree nodes expose them as public, but you have no guarantee they are up to date (and in fact,
if you split blocks or whatever during your pass, they definitely won't be)

This means passes either have to compute their own versions[1], or make 32 queries, or ....
Rather than try to hide this, i just made the API public, and make it do nothing if the numbers are already valid.

[1] Which we want as a non-recursive walk, which is not pretty, sadly,
because it cannot use the depth first iterators since you don't get called on the way back up. So you either have to do one walk with po_iterator
and one with df_iterator, or write your own non-recursive walk that looks identical to the one in updateDFSNumbers.

Reviewers: chandlerc

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D8946

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234930 91177308-0d34-0410-b5e6-96231b3b80d8
2015-04-14 19:09:16 +00:00
..
ADT
Analysis [SCEVExpander] Fix comments for functions. NFC. 2015-04-14 03:20:40 +00:00
AsmParser
Bitcode
CodeGen
Config
DebugInfo
ExecutionEngine [Orc] Add an Orc layer for applying arbitrary transforms to IR, use it to add 2015-04-13 22:12:54 +00:00
IR DebugInfo: Add implicit conversion from DISubprogram to DIScope 2015-04-14 16:19:44 +00:00
IRReader
LineEditor
Linker
LTO
MC Re-enable target-specific relocation table sorting and use it for Mips 2015-04-14 13:23:34 +00:00
Object
Option
Passes
ProfileData
Support Make updateDFSNumbers API public 2015-04-14 19:09:16 +00:00
TableGen
Target
Transforms Simplify n-ary adds by reassociation 2015-04-14 04:59:22 +00:00
CMakeLists.txt
InitializePasses.h Simplify n-ary adds by reassociation 2015-04-14 04:59:22 +00:00
LinkAllIR.h
LinkAllPasses.h Simplify n-ary adds by reassociation 2015-04-14 04:59:22 +00:00
module.modulemap
module.modulemap.build
Pass.h
PassAnalysisSupport.h
PassInfo.h
PassRegistry.h
PassSupport.h