Rename pass
authorChris Lattner <sabre@nondot.org>
Thu, 7 Oct 2004 04:12:02 +0000 (04:12 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 7 Oct 2004 04:12:02 +0000 (04:12 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16801 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Transforms/IPO.h
tools/gccas/gccas.cpp
tools/gccld/GenerateCode.cpp
tools/llvm-ld/GenerateCode.cpp

index dcd8262b1802495cd3f89e653ba950627cea77e4..7898b464b4a9befe5523aa8ed1ab6eae669d97ee 100644 (file)
@@ -41,10 +41,10 @@ ModulePass *createConstantMergePass();
 
 
 //===----------------------------------------------------------------------===//
-/// createGlobalConstifierPass - This function returns a new pass that marks
-/// internal globals "constant" if they are provably never written to.
+/// createGlobalOptimizerPass - This function returns a new pass that optimizes
+/// non-address taken internal globals.
 ///
-ModulePass *createGlobalConstifierPass();
+ModulePass *createGlobalOptimizerPass();
 
 
 //===----------------------------------------------------------------------===//
index ab64bbf18fc73ce332b10738d3cfd9603744f153..fe9c9d4110aa2dba1e878ebe29d9caa1847698a8 100644 (file)
@@ -71,8 +71,8 @@ void AddConfiguredTransformationPasses(PassManager &PM) {
   addPass(PM, createRaiseAllocationsPass());     // call %malloc -> malloc inst
   addPass(PM, createCFGSimplificationPass());    // Clean up disgusting code
   addPass(PM, createPromoteMemoryToRegister());  // Kill useless allocas
-  addPass(PM, createGlobalConstifierPass());     // Mark read-only globals const
-  addPass(PM, createGlobalDCEPass());            // Remove unused globals
+  addPass(PM, createGlobalOptimizerPass());      // Optimize out global vars
+  addPass(PM, createGlobalDCEPass());            // Remove unused fns and globs
   addPass(PM, createIPConstantPropagationPass());// IP Constant Propagation
   addPass(PM, createDeadArgEliminationPass());   // Dead argument elimination
   addPass(PM, createInstructionCombiningPass()); // Clean up after IPCP & DAE
index 633517d09d3c40aaac1b812bcc69cd187774016e..a803b43a0b254b3cc63778bc26733a6b1bd12e6d 100644 (file)
@@ -161,9 +161,8 @@ int llvm::GenerateBytecode(Module *M, bool Strip, bool Internalize,
       addPass(Passes, createInternalizePass());
     }
 
-    // Now that we internalized some globals, see if we can mark any globals as
-    // being constant!
-    addPass(Passes, createGlobalConstifierPass());
+    // Now that we internalized some globals, see if we can hack on them!
+    addPass(Passes, createGlobalOptimizerPass());
 
     // Linking modules together can lead to duplicated global constants, only
     // keep one copy of each constant...
index 23b0057a759bf0e33a517f14d3b6a9ab1e93169a..0e714fbade52586d14937f57cffd25f15389d572 100644 (file)
@@ -161,9 +161,8 @@ int llvm::GenerateBytecode(Module *M, bool Strip, bool Internalize,
       addPass(Passes, createInternalizePass());
     }
 
-    // Now that we internalized some globals, see if we can mark any globals as
-    // being constant!
-    addPass(Passes, createGlobalConstifierPass());
+    // Now that we internalized some globals, see if we can hack on them!
+    addPass(Passes, createGlobalOptimizerPass());
 
     // Linking modules together can lead to duplicated global constants, only
     // keep one copy of each constant...