add a pass that can extract all kinds of global values, not just functions. Update...
[oota-llvm.git] / include / llvm / Transforms / IPO.h
index 8d59fa6355c01d015e58f5223822b977325f7ec2..f9890ac6d09f791507a3138e9a7741625db15e04 100644 (file)
@@ -24,6 +24,7 @@ class ModulePass;
 class Pass;
 class Function;
 class BasicBlock;
+class GlobalValue;
 
 //===----------------------------------------------------------------------===//
 //
@@ -85,6 +86,14 @@ ModulePass *createGlobalDCEPass();
 ModulePass *createFunctionExtractionPass(Function *F, bool deleteFn = false,
                                          bool relinkCallees = false);
 
+//===----------------------------------------------------------------------===//
+/// createGVExtractionPass - If deleteFn is true, this pass deletes as
+/// the specified global values. Otherwise, it deletes as much of the module as
+/// possible, except for the global values specified.
+///
+ModulePass *createGVExtractionPass(std::vector<GlobalValue*>& GVs, bool 
+                                   deleteFn = false, 
+                                   bool relinkCallees = false);
 
 //===----------------------------------------------------------------------===//
 /// createFunctionInliningPass - Return a new pass object that uses a heuristic