Export the instruction forest support from the analysis library
llvm-svn: 556
This commit is contained in:
		
							parent
							
								
									1dd2c3f386
								
							
						
					
					
						commit
						2a35abb142
					
				| 
						 | 
					@ -19,6 +19,7 @@
 | 
				
			||||||
#include "llvm/Support/CommandLine.h"
 | 
					#include "llvm/Support/CommandLine.h"
 | 
				
			||||||
#include "llvm/Analysis/Writer.h"
 | 
					#include "llvm/Analysis/Writer.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "llvm/Analysis/InstForest.h"
 | 
				
			||||||
#include "llvm/Analysis/Dominators.h"
 | 
					#include "llvm/Analysis/Dominators.h"
 | 
				
			||||||
#include "llvm/Analysis/IntervalPartition.h"
 | 
					#include "llvm/Analysis/IntervalPartition.h"
 | 
				
			||||||
#include "llvm/Analysis/Expressions.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) {
 | 
					static void PrintDominatorSets(Method *M) {
 | 
				
			||||||
  cout << cfg::DominatorSet(M);
 | 
					  cout << cfg::DominatorSet(M);
 | 
				
			||||||
| 
						 | 
					@ -87,7 +91,7 @@ static void PrintPostDomFrontier(Method *M) {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
enum Ans {
 | 
					enum Ans {
 | 
				
			||||||
  print, intervals, exprclassify,
 | 
					  print, intervals, exprclassify, instforest,
 | 
				
			||||||
  domset, idom, domtree, domfrontier,
 | 
					  domset, idom, domtree, domfrontier,
 | 
				
			||||||
  postdomset, postidom, postdomtree, postdomfrontier,
 | 
					  postdomset, postidom, postdomtree, postdomfrontier,
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
| 
						 | 
					@ -99,6 +103,7 @@ cl::EnumList<enum Ans> AnalysesList(cl::NoFlags,
 | 
				
			||||||
  clEnumVal(print          , "Print each Method"),
 | 
					  clEnumVal(print          , "Print each Method"),
 | 
				
			||||||
  clEnumVal(intervals      , "Print Interval Partitions"),
 | 
					  clEnumVal(intervals      , "Print Interval Partitions"),
 | 
				
			||||||
  clEnumVal(exprclassify   , "Classify Expressions"),
 | 
					  clEnumVal(exprclassify   , "Classify Expressions"),
 | 
				
			||||||
 | 
					  clEnumVal(instforest     , "Print Instruction Forest"),
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  clEnumVal(domset         , "Print Dominator Sets"),
 | 
					  clEnumVal(domset         , "Print Dominator Sets"),
 | 
				
			||||||
  clEnumVal(idom           , "Print Immediate Dominators"),
 | 
					  clEnumVal(idom           , "Print Immediate Dominators"),
 | 
				
			||||||
| 
						 | 
					@ -118,6 +123,7 @@ struct {
 | 
				
			||||||
  { print          , PrintMethod              },
 | 
					  { print          , PrintMethod              },
 | 
				
			||||||
  { intervals      , PrintIntervalPartition   },
 | 
					  { intervals      , PrintIntervalPartition   },
 | 
				
			||||||
  { exprclassify   , PrintClassifiedExprs     },
 | 
					  { exprclassify   , PrintClassifiedExprs     },
 | 
				
			||||||
 | 
					  { instforest     , PrintInstForest          },
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  { domset         , PrintDominatorSets       },
 | 
					  { domset         , PrintDominatorSets       },
 | 
				
			||||||
  { idom           , PrintImmediateDominators },
 | 
					  { idom           , PrintImmediateDominators },
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue