mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-02 08:46:37 +00:00
Export the instruction forest support from the analysis library
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@556 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
e710047854
commit
b312259842
@ -19,6 +19,7 @@
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#include "llvm/Analysis/Writer.h"
|
||||
|
||||
#include "llvm/Analysis/InstForest.h"
|
||||
#include "llvm/Analysis/Dominators.h"
|
||||
#include "llvm/Analysis/IntervalPartition.h"
|
||||
#include "llvm/Analysis/Expressions.h"
|
||||
@ -59,6 +60,9 @@ static void PrintClassifiedExprs(Method *M) {
|
||||
}
|
||||
}
|
||||
|
||||
static void PrintInstForest(Method *M) {
|
||||
cout << analysis::InstForest<char>(M);
|
||||
}
|
||||
|
||||
static void PrintDominatorSets(Method *M) {
|
||||
cout << cfg::DominatorSet(M);
|
||||
@ -87,7 +91,7 @@ static void PrintPostDomFrontier(Method *M) {
|
||||
}
|
||||
|
||||
enum Ans {
|
||||
print, intervals, exprclassify,
|
||||
print, intervals, exprclassify, instforest,
|
||||
domset, idom, domtree, domfrontier,
|
||||
postdomset, postidom, postdomtree, postdomfrontier,
|
||||
};
|
||||
@ -99,6 +103,7 @@ cl::EnumList<enum Ans> AnalysesList(cl::NoFlags,
|
||||
clEnumVal(print , "Print each Method"),
|
||||
clEnumVal(intervals , "Print Interval Partitions"),
|
||||
clEnumVal(exprclassify , "Classify Expressions"),
|
||||
clEnumVal(instforest , "Print Instruction Forest"),
|
||||
|
||||
clEnumVal(domset , "Print Dominator Sets"),
|
||||
clEnumVal(idom , "Print Immediate Dominators"),
|
||||
@ -118,6 +123,7 @@ struct {
|
||||
{ print , PrintMethod },
|
||||
{ intervals , PrintIntervalPartition },
|
||||
{ exprclassify , PrintClassifiedExprs },
|
||||
{ instforest , PrintInstForest },
|
||||
|
||||
{ domset , PrintDominatorSets },
|
||||
{ idom , PrintImmediateDominators },
|
||||
|
Loading…
Reference in New Issue
Block a user