[llvm-commits] CVS: llvm/lib/VMCore/Pass.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sun Feb 8 19:00:01 PST 2004
Changes in directory llvm/lib/VMCore:
Pass.cpp updated: 1.54 -> 1.55
---
Log message:
Two problems with these lines of code:
1. The "work" was not in the assert, so it was punishing the optimized release
2. getNamedFunction is _very_ expensive in large programs. It is not designed
to be used like this, and was taking 7% of the execution time of the code
generator on perlbmk.
Since the assert "can never fail", I'm just killing it.
---
Diffs of the changes: (+0 -2)
Index: llvm/lib/VMCore/Pass.cpp
diff -u llvm/lib/VMCore/Pass.cpp:1.54 llvm/lib/VMCore/Pass.cpp:1.55
--- llvm/lib/VMCore/Pass.cpp:1.54 Fri Nov 21 14:23:48 2003
+++ llvm/lib/VMCore/Pass.cpp Sun Feb 8 18:59:07 2004
@@ -91,8 +91,6 @@
void FunctionPassManager::add(FunctionPass *P) { PM->add(P); }
void FunctionPassManager::add(ImmutablePass *IP) { PM->add(IP); }
bool FunctionPassManager::run(Function &F) {
- Function *mF = MP->getModule()->getNamedFunction(F.getName());
- assert((&F == mF) && "ModuleProvider does not contain this function!");
MP->materializeFunction(&F);
return PM->run(F);
}
More information about the llvm-commits
mailing list