[llvm-commits] CVS: llvm/include/llvm/Transforms/IPO.h Scalar.h

Chris Lattner lattner at cs.uiuc.edu
Sun Sep 19 21:41:52 PDT 2004



Changes in directory llvm/include/llvm/Transforms:

IPO.h updated: 1.34 -> 1.35
Scalar.h updated: 1.45 -> 1.46
---
Log message:

Do not prototype any of these passes as returning Pass*.  Instead, be specific


---
Diffs of the changes:  (+33 -33)

Index: llvm/include/llvm/Transforms/IPO.h
diff -u llvm/include/llvm/Transforms/IPO.h:1.34 llvm/include/llvm/Transforms/IPO.h:1.35
--- llvm/include/llvm/Transforms/IPO.h:1.34	Thu Aug 12 22:03:44 2004
+++ llvm/include/llvm/Transforms/IPO.h	Sun Sep 19 23:41:39 2004
@@ -19,7 +19,7 @@
 
 namespace llvm {
 
-class Pass;
+class ModulePass;
 class Function;
 class BasicBlock;
 
@@ -28,7 +28,7 @@
 /// to invoke/unwind instructions.  This should really be part of the C/C++
 /// front-end, but it's so much easier to write transformations in LLVM proper.
 ///
-Pass* createLowerSetJmpPass();
+ModulePass* createLowerSetJmpPass();
 
 //===----------------------------------------------------------------------===//
 /// createConstantMergePass - This function returns a new pass that merges
@@ -37,35 +37,35 @@
 /// constants into the program, regardless of whether or not they duplicate an
 /// existing string.
 ///
-Pass *createConstantMergePass();
+ModulePass *createConstantMergePass();
 
 
 //===----------------------------------------------------------------------===//
 /// createGlobalConstifierPass - This function returns a new pass that marks
 /// internal globals "constant" if they are provably never written to.
 ///
-Pass *createGlobalConstifierPass();
+ModulePass *createGlobalConstifierPass();
 
 
 //===----------------------------------------------------------------------===//
 /// createRaiseAllocationsPass - Return a new pass that transforms malloc and
 /// free function calls into malloc and free instructions.
 ///
-Pass *createRaiseAllocationsPass();
+ModulePass *createRaiseAllocationsPass();
 
 
 //===----------------------------------------------------------------------===//
 /// createDeadTypeEliminationPass - Return a new pass that eliminates symbol
 /// table entries for types that are never used.
 ///
-Pass *createDeadTypeEliminationPass();
+ModulePass *createDeadTypeEliminationPass();
 
 
 //===----------------------------------------------------------------------===//
 /// createGlobalDCEPass - This transform is designed to eliminate unreachable
 /// internal globals (functions or global variables)
 ///
-Pass *createGlobalDCEPass();
+ModulePass *createGlobalDCEPass();
 
 
 //===----------------------------------------------------------------------===//
@@ -73,7 +73,7 @@
 /// the specified function. Otherwise, it deletes as much of the module as
 /// possible, except for the function specified.
 ///
-Pass *createFunctionExtractionPass(Function *F, bool deleteFn = false);
+ModulePass *createFunctionExtractionPass(Function *F, bool deleteFn = false);
 
 
 //===----------------------------------------------------------------------===//
@@ -87,49 +87,49 @@
 ///
 /// This is an interprocedural pass.
 ///
-Pass *createFunctionResolvingPass();
+ModulePass *createFunctionResolvingPass();
 
 //===----------------------------------------------------------------------===//
 /// createFunctionInliningPass - Return a new pass object that uses a heuristic
 /// to inline direct function calls to small functions.
 ///
-Pass *createFunctionInliningPass();
+ModulePass *createFunctionInliningPass();
 
 //===----------------------------------------------------------------------===//
 /// createPruneEHPass - Return a new pass object which transforms invoke
 /// instructions into calls, if the callee can _not_ unwind the stack.
 ///
-Pass *createPruneEHPass();
+ModulePass *createPruneEHPass();
 
 //===----------------------------------------------------------------------===//
 /// createInternalizePass - This pass loops over all of the functions in the
 /// input module, looking for a main function.  If a main function is found, all
 /// other functions are marked as internal.
 ///
-Pass *createInternalizePass();
+ModulePass *createInternalizePass();
 
 //===----------------------------------------------------------------------===//
 /// createDeadArgEliminationPass - This pass removes arguments from functions
 /// which are not used by the body of the function.
 ///
-Pass *createDeadArgEliminationPass();
+ModulePass *createDeadArgEliminationPass();
 
 /// DeadArgHacking pass - Same as DAE, but delete arguments of external
 /// functions as well.  This is definitely not safe, and should only be used by
 /// bugpoint.
-Pass *createDeadArgHackingPass();
+ModulePass *createDeadArgHackingPass();
 
 //===----------------------------------------------------------------------===//
 /// createArgumentPromotionPass - This pass promotes "by reference" arguments to
 /// be passed by value.
 ///
-Pass *createArgumentPromotionPass();
+ModulePass *createArgumentPromotionPass();
 
 //===----------------------------------------------------------------------===//
 /// createIPConstantPropagationPass - This pass propagates constants from call
 /// sites into the bodies of functions.
 ///
-Pass *createIPConstantPropagationPass();
+ModulePass *createIPConstantPropagationPass();
 
 
 //===----------------------------------------------------------------------===//
@@ -137,12 +137,12 @@
 /// createSingleLoopExtractorPass - This pass extracts one natural loop from the
 /// program into a function if it can.  This is used by bugpoint.
 ///
-Pass *createSingleLoopExtractorPass();
+ModulePass *createSingleLoopExtractorPass();
 
 // createBlockExtractorPass - This pass extracts all blocks (except those
 // specified in the argument list) from the functions in the module.
 //
-Pass *llvm::createBlockExtractorPass(std::vector<BasicBlock*> &BTNE);
+ModulePass *llvm::createBlockExtractorPass(std::vector<BasicBlock*> &BTNE);
 
 } // End llvm namespace
 


Index: llvm/include/llvm/Transforms/Scalar.h
diff -u llvm/include/llvm/Transforms/Scalar.h:1.45 llvm/include/llvm/Transforms/Scalar.h:1.46
--- llvm/include/llvm/Transforms/Scalar.h:1.45	Tue Sep 14 11:34:08 2004
+++ llvm/include/llvm/Transforms/Scalar.h	Sun Sep 19 23:41:39 2004
@@ -17,7 +17,7 @@
 
 namespace llvm {
 
-class Pass;
+class ModulePass;
 class FunctionPass;
 class GetElementPtrInst;
 class PassInfo;
@@ -29,20 +29,20 @@
 // expressions as possible, by converting expressions to use getelementptr and
 // friends.
 //
-Pass *createRaisePointerReferencesPass();
+FunctionPass *createRaisePointerReferencesPass();
 
 //===----------------------------------------------------------------------===//
 //
 // Constant Propagation Pass - A worklist driven constant propagation pass
 //
-Pass *createConstantPropagationPass();
+FunctionPass *createConstantPropagationPass();
 
 
 //===----------------------------------------------------------------------===//
 //
 // Sparse Conditional Constant Propagation Pass
 //
-Pass *createSCCPPass();
+FunctionPass *createSCCPPass();
 
 
 //===----------------------------------------------------------------------===//
@@ -51,7 +51,7 @@
 // without modifying the CFG of the function.  It is a BasicBlockPass, so it
 // runs efficiently when queued next to other BasicBlockPass's.
 //
-Pass *createDeadInstEliminationPass();
+FunctionPass *createDeadInstEliminationPass();
 
 
 //===----------------------------------------------------------------------===//
@@ -68,7 +68,7 @@
 // DeadStoreElimination - This pass deletes stores that are post-dominated by
 // must-aliased stores and are not loaded used between the stores.
 //
-Pass *createDeadStoreEliminationPass();
+FunctionPass *createDeadStoreEliminationPass();
 
 //===----------------------------------------------------------------------===//
 //
@@ -76,7 +76,7 @@
 // algorithm assumes instructions are dead until proven otherwise, which makes
 // it more successful are removing non-obviously dead instructions.
 //
-Pass *createAggressiveDCEPass();
+FunctionPass *createAggressiveDCEPass();
 
 
 //===----------------------------------------------------------------------===//
@@ -84,7 +84,7 @@
 // Scalar Replacement of Aggregates - Break up alloca's of aggregates into
 // multiple allocas if possible.
 //
-Pass *createScalarReplAggregatesPass();
+FunctionPass *createScalarReplAggregatesPass();
 
 //===----------------------------------------------------------------------===//
 // 
@@ -117,7 +117,7 @@
 // InductionVariableSimplify - Transform induction variables in a program to all
 // use a single canonical induction variable per loop.
 //
-Pass *createIndVarSimplifyPass();
+FunctionPass *createIndVarSimplifyPass();
 
 
 //===----------------------------------------------------------------------===//
@@ -167,7 +167,7 @@
 //   %Y = load int* %X
 //   ret int %Y
 //
-Pass *createPromoteMemoryToRegister();
+FunctionPass *createPromoteMemoryToRegister();
 
 
 //===----------------------------------------------------------------------===//
@@ -187,14 +187,14 @@
 //    else
 //      Y = X * Z;   // = 0
 //
-Pass *createCorrelatedExpressionEliminationPass();
+FunctionPass *createCorrelatedExpressionEliminationPass();
 
 //===----------------------------------------------------------------------===//
 //
 // TailDuplication - Eliminate unconditional branches through controlled code
 // duplication, creating simpler CFG structures.
 //
-Pass *createTailDuplicationPass();
+FunctionPass *createTailDuplicationPass();
 
 
 //===----------------------------------------------------------------------===//
@@ -227,7 +227,7 @@
 //
 //   AU.addRequiredID(LoopSimplifyID);
 //
-Pass *createLoopSimplifyPass();
+FunctionPass *createLoopSimplifyPass();
 extern const PassInfo *LoopSimplifyID;
 
 //===----------------------------------------------------------------------===//
@@ -286,8 +286,8 @@
 //
 // These functions removes symbols from functions and modules.
 //
-Pass *createSymbolStrippingPass();
-Pass *createFullSymbolStrippingPass();
+FunctionPass *createSymbolStrippingPass();
+FunctionPass *createFullSymbolStrippingPass();
 
 } // End llvm namespace
 






More information about the llvm-commits mailing list