mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-19 15:13:49 -04:00
Introduce analysis pass to compute PostDominators in the new pass manager. NFC
Differential Revision: http://reviews.llvm.org/D17537 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@261902 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
+38
-10
@@ -111,20 +111,36 @@ struct DomOnlyViewer : public DOTGraphTraitsViewer<
|
||||
}
|
||||
};
|
||||
|
||||
struct PostDomViewer
|
||||
: public DOTGraphTraitsViewer<PostDominatorTree, false> {
|
||||
struct PostDominatorTreeWrapperPassAnalysisGraphTraits {
|
||||
static PostDominatorTree *getGraph(PostDominatorTreeWrapperPass *PDTWP) {
|
||||
return &PDTWP->getPostDomTree();
|
||||
}
|
||||
};
|
||||
|
||||
struct PostDomViewer : public DOTGraphTraitsViewer<
|
||||
PostDominatorTreeWrapperPass, false,
|
||||
PostDominatorTree *,
|
||||
PostDominatorTreeWrapperPassAnalysisGraphTraits> {
|
||||
static char ID;
|
||||
PostDomViewer() :
|
||||
DOTGraphTraitsViewer<PostDominatorTree, false>("postdom", ID){
|
||||
DOTGraphTraitsViewer<PostDominatorTreeWrapperPass, false,
|
||||
PostDominatorTree *,
|
||||
PostDominatorTreeWrapperPassAnalysisGraphTraits>(
|
||||
"postdom", ID){
|
||||
initializePostDomViewerPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
};
|
||||
|
||||
struct PostDomOnlyViewer
|
||||
: public DOTGraphTraitsViewer<PostDominatorTree, true> {
|
||||
struct PostDomOnlyViewer : public DOTGraphTraitsViewer<
|
||||
PostDominatorTreeWrapperPass, true,
|
||||
PostDominatorTree *,
|
||||
PostDominatorTreeWrapperPassAnalysisGraphTraits> {
|
||||
static char ID;
|
||||
PostDomOnlyViewer() :
|
||||
DOTGraphTraitsViewer<PostDominatorTree, true>("postdomonly", ID){
|
||||
DOTGraphTraitsViewer<PostDominatorTreeWrapperPass, true,
|
||||
PostDominatorTree *,
|
||||
PostDominatorTreeWrapperPassAnalysisGraphTraits>(
|
||||
"postdomonly", ID){
|
||||
initializePostDomOnlyViewerPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
};
|
||||
@@ -175,19 +191,31 @@ struct DomOnlyPrinter : public DOTGraphTraitsPrinter<
|
||||
};
|
||||
|
||||
struct PostDomPrinter
|
||||
: public DOTGraphTraitsPrinter<PostDominatorTree, false> {
|
||||
: public DOTGraphTraitsPrinter<
|
||||
PostDominatorTreeWrapperPass, false,
|
||||
PostDominatorTree *,
|
||||
PostDominatorTreeWrapperPassAnalysisGraphTraits> {
|
||||
static char ID;
|
||||
PostDomPrinter() :
|
||||
DOTGraphTraitsPrinter<PostDominatorTree, false>("postdom", ID) {
|
||||
DOTGraphTraitsPrinter<PostDominatorTreeWrapperPass, false,
|
||||
PostDominatorTree *,
|
||||
PostDominatorTreeWrapperPassAnalysisGraphTraits>(
|
||||
"postdom", ID) {
|
||||
initializePostDomPrinterPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
};
|
||||
|
||||
struct PostDomOnlyPrinter
|
||||
: public DOTGraphTraitsPrinter<PostDominatorTree, true> {
|
||||
: public DOTGraphTraitsPrinter<
|
||||
PostDominatorTreeWrapperPass, true,
|
||||
PostDominatorTree *,
|
||||
PostDominatorTreeWrapperPassAnalysisGraphTraits> {
|
||||
static char ID;
|
||||
PostDomOnlyPrinter() :
|
||||
DOTGraphTraitsPrinter<PostDominatorTree, true>("postdomonly", ID) {
|
||||
DOTGraphTraitsPrinter<PostDominatorTreeWrapperPass, true,
|
||||
PostDominatorTree *,
|
||||
PostDominatorTreeWrapperPassAnalysisGraphTraits>(
|
||||
"postdomonly", ID) {
|
||||
initializePostDomOnlyPrinterPass(*PassRegistry::getPassRegistry());
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user