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 | e21f68d1e8fd1b7b9d0f12c300b3d096bcf3bdf2 (patch) | |
tree | 2b1cf6511a2abad95d7b841c37cf4355e8b319bb /lib/VMCore | |
parent | 99d6b8ec95b86b3e66e2fea50d4114c844edc9dd (diff) | |
download | external_llvm-e21f68d1e8fd1b7b9d0f12c300b3d096bcf3bdf2.zip external_llvm-e21f68d1e8fd1b7b9d0f12c300b3d096bcf3bdf2.tar.gz external_llvm-e21f68d1e8fd1b7b9d0f12c300b3d096bcf3bdf2.tar.bz2 |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11214 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore')
-rw-r--r-- | lib/VMCore/Pass.cpp | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/lib/VMCore/Pass.cpp b/lib/VMCore/Pass.cpp index 40a3b7d..33f606f 100644 --- a/lib/VMCore/Pass.cpp +++ b/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); } |