[llvm-commits] CVS: llvm/lib/Transforms/IPO/GlobalOpt.cpp
Chris Lattner
lattner at cs.uiuc.edu
Mon Sep 26 13:38:32 PDT 2005
Changes in directory llvm/lib/Transforms/IPO:
GlobalOpt.cpp updated: 1.52 -> 1.53
---
Log message:
Remove some dead code. ctor evaluation subsumes empty ctor elim
---
Diffs of the changes: (+0 -12)
GlobalOpt.cpp | 12 ------------
1 files changed, 12 deletions(-)
Index: llvm/lib/Transforms/IPO/GlobalOpt.cpp
diff -u llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.52 llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.53
--- llvm/lib/Transforms/IPO/GlobalOpt.cpp:1.52 Mon Sep 26 12:07:09 2005
+++ llvm/lib/Transforms/IPO/GlobalOpt.cpp Mon Sep 26 15:38:20 2005
@@ -45,7 +45,6 @@
"Number of global vars shrunk to booleans");
Statistic<> NumFastCallFns("globalopt",
"Number of functions converted to fastcc");
- Statistic<> NumEmptyCtor ("globalopt", "Number of empty ctors removed");
Statistic<> NumCtorsEvaluated("globalopt","Number of static ctors evaluated");
struct GlobalOpt : public ModulePass {
@@ -926,7 +925,6 @@
Module::global_iterator &GVI) {
std::set<PHINode*> PHIUsers;
GlobalStatus GS;
- PHIUsers.clear();
GV->removeDeadConstantUsers();
if (GV->use_empty()) {
@@ -1552,16 +1550,6 @@
++NumCtorsEvaluated;
continue;
}
-
- // If the function is empty, just remove it from the ctor list.
- if (isa<ReturnInst>(F->begin()->getTerminator()) &&
- &F->begin()->front() == F->begin()->getTerminator()) {
- Ctors.erase(Ctors.begin()+i);
- MadeChange = true;
- --i;
- ++NumEmptyCtor;
- continue;
- }
}
if (!MadeChange) return false;
More information about the llvm-commits
mailing list