[PM] Pull the generic graph algorithms and data structures for dominator
authorChandler Carruth <chandlerc@gmail.com>
Mon, 13 Jan 2014 10:52:56 +0000 (10:52 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Mon, 13 Jan 2014 10:52:56 +0000 (10:52 +0000)
commit2073b0a63cfd7ea54b5307953ce11f378365d73d
tree2e1edcb2850f00478dbf00804a7c60f291d9bc2d
parenteaefef43d7d8a4cc3b6bb2f35d370cdb04a54687
[PM] Pull the generic graph algorithms and data structures for dominator
trees into the Support library.

These are all expressed in terms of the generic GraphTraits and CFG,
with no reliance on any concrete IR types. Putting them in support
clarifies that and makes the fact that the static analyzer in Clang uses
them much more sane. When moving the Dominators.h file into the IR
library I claimed that this was the right home for it but not something
I planned to work on. Oops.

So why am I doing this? It happens to be one step toward breaking the
requirement that IR verification can only be performed from inside of
a pass context, which completely blocks the implementation of
verification for the new pass manager infrastructure. Fixing it will
also allow removing the concept of the "preverify" step (WTF???) and
allow the verifier to cleanly flag functions which fail verification in
a way that precludes even computing dominance information. Currently,
that results in a fatal error even when you ask the verifier to not
fatally error. It's awesome like that.

The yak shaving will continue...

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@199095 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/CodeGen/MachineDominators.h
include/llvm/IR/DominatorInternals.h [deleted file]
include/llvm/IR/Dominators.h
include/llvm/IR/Verifier.h
include/llvm/Support/GenericDomTree.h [new file with mode: 0644]
include/llvm/Support/GenericDomTreeConstruction.h [new file with mode: 0644]
lib/Analysis/PostDominators.cpp
lib/CodeGen/GCStrategy.cpp
lib/IR/Dominators.cpp
lib/Target/R600/AMDILCFGStructurizer.cpp
lib/Transforms/Scalar/CodeGenPrepare.cpp