diff options
| author | Chris Lattner <sabre@nondot.org> | 2004-02-09 00:59:07 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2004-02-09 00:59:07 +0000 |
| commit | 2eaf58775e55042751d8e74d2fa2020c5b635855 (patch) | |
| tree | 0cbb88b55bbb386f027b7e10c626b37794c44bda /llvm/lib/VMCore | |
| parent | 57ea2e3294ffe2a68dbbfed6eed08b1ae3fe899b (diff) | |
| download | bcm5719-llvm-2eaf58775e55042751d8e74d2fa2020c5b635855.tar.gz bcm5719-llvm-2eaf58775e55042751d8e74d2fa2020c5b635855.zip | |
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.
llvm-svn: 11214
Diffstat (limited to 'llvm/lib/VMCore')
| -rw-r--r-- | llvm/lib/VMCore/Pass.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/llvm/lib/VMCore/Pass.cpp b/llvm/lib/VMCore/Pass.cpp index 40a3b7d17fe..33f606f6cec 100644 --- a/llvm/lib/VMCore/Pass.cpp +++ b/llvm/lib/VMCore/Pass.cpp @@ -91,8 +91,6 @@ FunctionPassManager::~FunctionPassManager() { delete PM; } 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); } |

