summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-07-26 09:48:23 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-07-26 09:48:23 +0000
commit6115b39ffdabcf375210bf4d32cbeadaedc0dbf4 (patch)
treef385c9166334a31e004dff92387af0e0723737c0 /llvm/lib/Analysis
parente59313a298b979a759de61dba53f523a341c74f5 (diff)
downloadbcm5719-llvm-6115b39ffdabcf375210bf4d32cbeadaedc0dbf4.tar.gz
bcm5719-llvm-6115b39ffdabcf375210bf4d32cbeadaedc0dbf4.zip
Remove Value::getName{Start,End}, the last of the old Name APIs.
llvm-svn: 77152
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r--llvm/lib/Analysis/DebugInfo.cpp4
-rw-r--r--llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp2
-rw-r--r--llvm/lib/Analysis/SparsePropagation.cpp11
3 files changed, 9 insertions, 8 deletions
diff --git a/llvm/lib/Analysis/DebugInfo.cpp b/llvm/lib/Analysis/DebugInfo.cpp
index aded6d8eee8..61c9a4af3e1 100644
--- a/llvm/lib/Analysis/DebugInfo.cpp
+++ b/llvm/lib/Analysis/DebugInfo.cpp
@@ -329,7 +329,7 @@ bool DISubprogram::describes(const Function *F) {
getLinkageName(Name);
if (Name.empty())
getName(Name);
- if (!Name.empty() && (strcmp(Name.c_str(), F->getNameStart()) == false))
+ if (F->getName() == Name)
return true;
return false;
}
@@ -1057,7 +1057,7 @@ namespace llvm {
for (Module::global_iterator GVI = M.global_begin(), E = M.global_end();
GVI != E; GVI++) {
GlobalVariable *GV = GVI;
- if (GV->hasName() && strncmp(GV->getNameStart(), "llvm.dbg", 8) == 0
+ if (GV->hasName() && GV->getName().startswith("llvm.dbg")
&& GV->isConstant() && GV->hasInitializer()) {
DICompileUnit C(GV);
if (C.isNull() == false) {
diff --git a/llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp b/llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp
index 3880d0a10bb..df2f0f8bd69 100644
--- a/llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp
+++ b/llvm/lib/Analysis/IPA/CallGraphSCCPass.cpp
@@ -109,7 +109,7 @@ bool CGPassManager::runOnModule(Module &M) {
for (unsigned i = 0, e = SCC.size(); i != e; ++i) {
Function *F = SCC[i]->getFunction();
if (F) {
- dumpPassInfo(P, EXECUTION_MSG, ON_FUNCTION_MSG, F->getNameStart());
+ dumpPassInfo(P, EXECUTION_MSG, ON_FUNCTION_MSG, F->getName());
Changed |= FPP->runOnFunction(*F);
}
}
diff --git a/llvm/lib/Analysis/SparsePropagation.cpp b/llvm/lib/Analysis/SparsePropagation.cpp
index c1b39fe7d75..2522932e126 100644
--- a/llvm/lib/Analysis/SparsePropagation.cpp
+++ b/llvm/lib/Analysis/SparsePropagation.cpp
@@ -19,6 +19,7 @@
#include "llvm/Instructions.h"
#include "llvm/LLVMContext.h"
#include "llvm/Support/Debug.h"
+#include "llvm/Support/raw_ostream.h"
using namespace llvm;
//===----------------------------------------------------------------------===//
@@ -88,7 +89,7 @@ void SparseSolver::UpdateState(Instruction &Inst, LatticeVal V) {
/// MarkBlockExecutable - This method can be used by clients to mark all of
/// the blocks that are known to be intrinsically live in the processed unit.
void SparseSolver::MarkBlockExecutable(BasicBlock *BB) {
- DOUT << "Marking Block Executable: " << BB->getNameStart() << "\n";
+ DEBUG(errs() << "Marking Block Executable: " << BB->getName() << "\n");
BBExecutable.insert(BB); // Basic block is executable!
BBWorkList.push_back(BB); // Add the block to the work list!
}
@@ -99,8 +100,8 @@ void SparseSolver::markEdgeExecutable(BasicBlock *Source, BasicBlock *Dest) {
if (!KnownFeasibleEdges.insert(Edge(Source, Dest)).second)
return; // This edge is already known to be executable!
- DOUT << "Marking Edge Executable: " << Source->getNameStart()
- << " -> " << Dest->getNameStart() << "\n";
+ DEBUG(errs() << "Marking Edge Executable: " << Source->getName()
+ << " -> " << Dest->getName() << "\n");
if (BBExecutable.count(Dest)) {
// The destination is already executable, but we just made an edge
@@ -284,7 +285,7 @@ void SparseSolver::Solve(Function &F) {
Instruction *I = InstWorkList.back();
InstWorkList.pop_back();
- DOUT << "\nPopped off I-WL: " << *I;
+ DEBUG(errs() << "\nPopped off I-WL: " << *I);
// "I" got into the work list because it made a transition. See if any
// users are both live and in need of updating.
@@ -301,7 +302,7 @@ void SparseSolver::Solve(Function &F) {
BasicBlock *BB = BBWorkList.back();
BBWorkList.pop_back();
- DOUT << "\nPopped off BBWL: " << *BB;
+ DEBUG(errs() << "\nPopped off BBWL: " << *BB);
// Notify all instructions in this basic block that they are newly
// executable.
OpenPOWER on IntegriCloud