diff options
author | Chris Lattner <sabre@nondot.org> | 2001-09-14 01:42:42 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2001-09-14 01:42:42 +0000 |
commit | b312259842bcae3ef066795cf063a91d58b649e6 (patch) | |
tree | fda5a88d6e9497ec5149653de35e697443cb6c63 /tools/analyze | |
parent | e7100478549b34b1dfd066eebd76f4fc30dcd156 (diff) | |
download | llvm-b312259842bcae3ef066795cf063a91d58b649e6.tar.gz llvm-b312259842bcae3ef066795cf063a91d58b649e6.tar.bz2 llvm-b312259842bcae3ef066795cf063a91d58b649e6.tar.xz |
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
Diffstat (limited to 'tools/analyze')
-rw-r--r-- | tools/analyze/analyze.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/analyze/analyze.cpp b/tools/analyze/analyze.cpp index baad23787b..8e88e7d1fc 100644 --- a/tools/analyze/analyze.cpp +++ b/tools/analyze/analyze.cpp @@ -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 }, |