aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/llvm/Transforms/IPO.h6
-rw-r--r--tools/gccas/gccas.cpp4
-rw-r--r--tools/gccld/GenerateCode.cpp5
-rw-r--r--tools/llvm-ld/GenerateCode.cpp5
4 files changed, 9 insertions, 11 deletions
diff --git a/include/llvm/Transforms/IPO.h b/include/llvm/Transforms/IPO.h
index dcd8262b18..7898b464b4 100644
--- a/include/llvm/Transforms/IPO.h
+++ b/include/llvm/Transforms/IPO.h
@@ -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();
//===----------------------------------------------------------------------===//
diff --git a/tools/gccas/gccas.cpp b/tools/gccas/gccas.cpp
index ab64bbf18f..fe9c9d4110 100644
--- a/tools/gccas/gccas.cpp
+++ b/tools/gccas/gccas.cpp
@@ -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
diff --git a/tools/gccld/GenerateCode.cpp b/tools/gccld/GenerateCode.cpp
index 633517d09d..a803b43a0b 100644
--- a/tools/gccld/GenerateCode.cpp
+++ b/tools/gccld/GenerateCode.cpp
@@ -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...
diff --git a/tools/llvm-ld/GenerateCode.cpp b/tools/llvm-ld/GenerateCode.cpp
index 23b0057a75..0e714fbade 100644
--- a/tools/llvm-ld/GenerateCode.cpp
+++ b/tools/llvm-ld/GenerateCode.cpp
@@ -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...