summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-07-26 08:34:35 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-07-26 08:34:35 +0000
commitca414c7cae143464da9f7051dd8b28c28b2baed7 (patch)
tree65189ecd9d182344ce17746b42b787fa31e753f9 /llvm/lib/Transforms
parent600dfac30ae7fae0a3b529021f7bd6694093a0ea (diff)
downloadbcm5719-llvm-ca414c7cae143464da9f7051dd8b28c28b2baed7.tar.gz
bcm5719-llvm-ca414c7cae143464da9f7051dd8b28c28b2baed7.zip
Remove Value::getNameLen
llvm-svn: 77148
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp b/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp
index 9a5ed456ba7..e48b14c2cd1 100644
--- a/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp
+++ b/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp
@@ -31,6 +31,7 @@
#include "llvm/ADT/Statistic.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/Debug.h"
+#include "llvm/Support/raw_ostream.h"
#include "llvm/Config/config.h"
using namespace llvm;
@@ -1655,20 +1656,18 @@ bool SimplifyLibCalls::runOnFunction(Function &F) {
continue;
// Ignore unknown calls.
- const char *CalleeName = Callee->getNameStart();
- StringMap<LibCallOptimization*>::iterator OMI =
- Optimizations.find(StringRef(CalleeName, Callee->getNameLen()));
- if (OMI == Optimizations.end()) continue;
+ LibCallOptimization *LCO = Optimizations.lookup(Callee->getName());
+ if (!LCO) continue;
// Set the builder to the instruction after the call.
Builder.SetInsertPoint(BB, I);
// Try to optimize this call.
- Value *Result = OMI->second->OptimizeCall(CI, TD, Builder);
+ Value *Result = LCO->OptimizeCall(CI, TD, Builder);
if (Result == 0) continue;
- DEBUG(DOUT << "SimplifyLibCalls simplified: " << *CI;
- DOUT << " into: " << *Result << "\n");
+ DEBUG(errs() << "SimplifyLibCalls simplified: " << *CI;
+ errs() << " into: " << *Result << "\n");
// Something changed!
Changed = true;
OpenPOWER on IntegriCloud