mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-27 21:50:40 +00:00
Remove all remaining uses of Value::getNameStr().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144648 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
25ad1cc32a
commit
a7b0cb7594
@ -24,7 +24,6 @@
|
||||
#include "llvm/Support/Debug.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
#include <vector>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
namespace llvm {
|
||||
@ -52,15 +51,16 @@ class BlockFrequencyImpl {
|
||||
const uint32_t EntryFreq;
|
||||
|
||||
std::string getBlockName(BasicBlock *BB) const {
|
||||
return BB->getNameStr();
|
||||
return BB->getName().str();
|
||||
}
|
||||
|
||||
std::string getBlockName(MachineBasicBlock *MBB) const {
|
||||
std::stringstream ss;
|
||||
std::string str;
|
||||
raw_string_ostream ss(str);
|
||||
ss << "BB#" << MBB->getNumber();
|
||||
|
||||
if (const BasicBlock *BB = MBB->getBasicBlock())
|
||||
ss << " derived from LLVM BB " << BB->getNameStr();
|
||||
ss << " derived from LLVM BB " << BB->getName();
|
||||
|
||||
return ss.str();
|
||||
}
|
||||
|
@ -29,13 +29,13 @@ struct DOTGraphTraits<const Function*> : public DefaultDOTGraphTraits {
|
||||
DOTGraphTraits (bool isSimple=false) : DefaultDOTGraphTraits(isSimple) {}
|
||||
|
||||
static std::string getGraphName(const Function *F) {
|
||||
return "CFG for '" + F->getNameStr() + "' function";
|
||||
return "CFG for '" + F->getName().str() + "' function";
|
||||
}
|
||||
|
||||
static std::string getSimpleNodeLabel(const BasicBlock *Node,
|
||||
const Function *) {
|
||||
if (!Node->getName().empty())
|
||||
return Node->getNameStr();
|
||||
return Node->getName().str();
|
||||
|
||||
std::string Str;
|
||||
raw_string_ostream OS(Str);
|
||||
|
@ -31,7 +31,7 @@ struct DOTGraphTraitsViewer : public FunctionPass {
|
||||
std::string Title, GraphName;
|
||||
Graph = &getAnalysis<Analysis>();
|
||||
GraphName = DOTGraphTraits<Analysis*>::getGraphName(Graph);
|
||||
Title = GraphName + " for '" + F.getNameStr() + "' function";
|
||||
Title = GraphName + " for '" + F.getName().str() + "' function";
|
||||
ViewGraph(Graph, Name, Simple, Title);
|
||||
|
||||
return false;
|
||||
@ -55,7 +55,7 @@ struct DOTGraphTraitsPrinter : public FunctionPass {
|
||||
|
||||
virtual bool runOnFunction(Function &F) {
|
||||
Analysis *Graph;
|
||||
std::string Filename = Name + "." + F.getNameStr() + ".dot";
|
||||
std::string Filename = Name + "." + F.getName().str() + ".dot";
|
||||
errs() << "Writing '" << Filename << "'...";
|
||||
|
||||
std::string ErrorInfo;
|
||||
@ -64,7 +64,7 @@ struct DOTGraphTraitsPrinter : public FunctionPass {
|
||||
|
||||
std::string Title, GraphName;
|
||||
GraphName = DOTGraphTraits<Analysis*>::getGraphName(Graph);
|
||||
Title = GraphName + " for '" + F.getNameStr() + "' function";
|
||||
Title = GraphName + " for '" + F.getName().str() + "' function";
|
||||
|
||||
if (ErrorInfo.empty())
|
||||
WriteGraph(File, Graph, Simple, Title);
|
||||
|
@ -480,8 +480,8 @@ getEdgeWeight(const BasicBlock *Src, const BasicBlock *Dst) const {
|
||||
void BranchProbabilityInfo::
|
||||
setEdgeWeight(const BasicBlock *Src, const BasicBlock *Dst, uint32_t Weight) {
|
||||
Weights[std::make_pair(Src, Dst)] = Weight;
|
||||
DEBUG(dbgs() << "set edge " << Src->getNameStr() << " -> "
|
||||
<< Dst->getNameStr() << " weight to " << Weight
|
||||
DEBUG(dbgs() << "set edge " << Src->getName() << " -> "
|
||||
<< Dst->getName() << " weight to " << Weight
|
||||
<< (isEdgeHot(Src, Dst) ? " [is HOT now]\n" : "\n"));
|
||||
}
|
||||
|
||||
@ -501,7 +501,7 @@ BranchProbabilityInfo::printEdgeProbability(raw_ostream &OS,
|
||||
const BasicBlock *Dst) const {
|
||||
|
||||
const BranchProbability Prob = getEdgeProbability(Src, Dst);
|
||||
OS << "edge " << Src->getNameStr() << " -> " << Dst->getNameStr()
|
||||
OS << "edge " << Src->getName() << " -> " << Dst->getName()
|
||||
<< " probability is " << Prob
|
||||
<< (isEdgeHot(Src, Dst) ? " [HOT edge]\n" : "\n");
|
||||
|
||||
|
@ -77,7 +77,7 @@ namespace {
|
||||
}
|
||||
|
||||
virtual bool runOnFunction(Function &F) {
|
||||
std::string Filename = "cfg." + F.getNameStr() + ".dot";
|
||||
std::string Filename = "cfg." + F.getName().str() + ".dot";
|
||||
errs() << "Writing '" << Filename << "'...";
|
||||
|
||||
std::string ErrorInfo;
|
||||
@ -111,7 +111,7 @@ namespace {
|
||||
}
|
||||
|
||||
virtual bool runOnFunction(Function &F) {
|
||||
std::string Filename = "cfg." + F.getNameStr() + ".dot";
|
||||
std::string Filename = "cfg." + F.getName().str() + ".dot";
|
||||
errs() << "Writing '" << Filename << "'...";
|
||||
|
||||
std::string ErrorInfo;
|
||||
|
@ -137,22 +137,22 @@ bool PathProfileVerifier::runOnModule (Module &M) {
|
||||
BasicBlock* source = nextEdge->getSource();
|
||||
BasicBlock* target = nextEdge->getTarget();
|
||||
unsigned duplicateNumber = nextEdge->getDuplicateNumber();
|
||||
DEBUG(dbgs () << source->getNameStr() << " --{" << duplicateNumber
|
||||
<< "}--> " << target->getNameStr());
|
||||
DEBUG(dbgs() << source->getName() << " --{" << duplicateNumber
|
||||
<< "}--> " << target->getName());
|
||||
|
||||
// Ensure all the referenced edges exist
|
||||
// TODO: make this a separate function
|
||||
if( !arrayMap.count(source) ) {
|
||||
errs() << " error [" << F->getNameStr() << "()]: source '"
|
||||
<< source->getNameStr()
|
||||
errs() << " error [" << F->getName() << "()]: source '"
|
||||
<< source->getName()
|
||||
<< "' does not exist in the array map.\n";
|
||||
} else if( !arrayMap[source].count(target) ) {
|
||||
errs() << " error [" << F->getNameStr() << "()]: target '"
|
||||
<< target->getNameStr()
|
||||
errs() << " error [" << F->getName() << "()]: target '"
|
||||
<< target->getName()
|
||||
<< "' does not exist in the array map.\n";
|
||||
} else if( !arrayMap[source][target].count(duplicateNumber) ) {
|
||||
errs() << " error [" << F->getNameStr() << "()]: edge "
|
||||
<< source->getNameStr() << " -> " << target->getNameStr()
|
||||
errs() << " error [" << F->getName() << "()]: edge "
|
||||
<< source->getName() << " -> " << target->getName()
|
||||
<< " duplicate number " << duplicateNumber
|
||||
<< " does not exist in the array map.\n";
|
||||
} else {
|
||||
|
@ -332,7 +332,7 @@ bool ProfileEstimatorPass::runOnFunction(Function &F) {
|
||||
// Clear Minimal Edges.
|
||||
MinimalWeight.clear();
|
||||
|
||||
DEBUG(dbgs() << "Working on function " << F.getNameStr() << "\n");
|
||||
DEBUG(dbgs() << "Working on function " << F.getName() << "\n");
|
||||
|
||||
// Since the entry block is the first one and has no predecessors, the edge
|
||||
// (0,entry) is inserted with the starting weight of 1.
|
||||
|
@ -160,7 +160,7 @@ bool LoaderPass::runOnModule(Module &M) {
|
||||
ReadCount = 0;
|
||||
for (Module::iterator F = M.begin(), E = M.end(); F != E; ++F) {
|
||||
if (F->isDeclaration()) continue;
|
||||
DEBUG(dbgs()<<"Working on "<<F->getNameStr()<<"\n");
|
||||
DEBUG(dbgs() << "Working on " << F->getName() << "\n");
|
||||
readEdge(getEdge(0,&F->getEntryBlock()), Counters);
|
||||
for (Function::iterator BB = F->begin(), E = F->end(); BB != E; ++BB) {
|
||||
TerminatorInst *TI = BB->getTerminator();
|
||||
@ -181,7 +181,7 @@ bool LoaderPass::runOnModule(Module &M) {
|
||||
ReadCount = 0;
|
||||
for (Module::iterator F = M.begin(), E = M.end(); F != E; ++F) {
|
||||
if (F->isDeclaration()) continue;
|
||||
DEBUG(dbgs()<<"Working on "<<F->getNameStr()<<"\n");
|
||||
DEBUG(dbgs() << "Working on " << F->getName() << "\n");
|
||||
readEdge(getEdge(0,&F->getEntryBlock()), Counters);
|
||||
for (Function::iterator BB = F->begin(), E = F->end(); BB != E; ++BB) {
|
||||
TerminatorInst *TI = BB->getTerminator();
|
||||
|
@ -125,8 +125,8 @@ namespace llvm {
|
||||
outCount++;
|
||||
}
|
||||
}
|
||||
dbgs() << "Block " << BB->getNameStr() << " in "
|
||||
<< BB->getParent()->getNameStr() << ":"
|
||||
dbgs() << "Block " << BB->getName() << " in "
|
||||
<< BB->getParent()->getName() << ":"
|
||||
<< "BBWeight=" << format("%20.20g",BBWeight) << ","
|
||||
<< "inWeight=" << format("%20.20g",inWeight) << ","
|
||||
<< "inCount=" << inCount << ","
|
||||
@ -143,8 +143,8 @@ namespace llvm {
|
||||
|
||||
template<class FType, class BType>
|
||||
void ProfileVerifierPassT<FType, BType>::debugEntry (DetailedBlockInfo *DI) {
|
||||
dbgs() << "TROUBLE: Block " << DI->BB->getNameStr() << " in "
|
||||
<< DI->BB->getParent()->getNameStr() << ":"
|
||||
dbgs() << "TROUBLE: Block " << DI->BB->getName() << " in "
|
||||
<< DI->BB->getParent()->getName() << ":"
|
||||
<< "BBWeight=" << format("%20.20g",DI->BBWeight) << ","
|
||||
<< "inWeight=" << format("%20.20g",DI->inWeight) << ","
|
||||
<< "inCount=" << DI->inCount << ","
|
||||
@ -201,13 +201,13 @@ namespace llvm {
|
||||
double EdgeWeight = PI->getEdgeWeight(E);
|
||||
if (EdgeWeight == ProfileInfoT<FType, BType>::MissingValue) {
|
||||
dbgs() << "Edge " << E << " in Function "
|
||||
<< ProfileInfoT<FType, BType>::getFunction(E)->getNameStr() << ": ";
|
||||
<< ProfileInfoT<FType, BType>::getFunction(E)->getName() << ": ";
|
||||
ASSERTMESSAGE("Edge has missing value");
|
||||
return 0;
|
||||
} else {
|
||||
if (EdgeWeight < 0) {
|
||||
dbgs() << "Edge " << E << " in Function "
|
||||
<< ProfileInfoT<FType, BType>::getFunction(E)->getNameStr() << ": ";
|
||||
<< ProfileInfoT<FType, BType>::getFunction(E)->getName() << ": ";
|
||||
ASSERTMESSAGE("Edge has negative value");
|
||||
}
|
||||
return EdgeWeight;
|
||||
@ -220,8 +220,8 @@ namespace llvm {
|
||||
DetailedBlockInfo *DI) {
|
||||
if (Error) {
|
||||
DEBUG(debugEntry(DI));
|
||||
dbgs() << "Block " << DI->BB->getNameStr() << " in Function "
|
||||
<< DI->BB->getParent()->getNameStr() << ": ";
|
||||
dbgs() << "Block " << DI->BB->getName() << " in Function "
|
||||
<< DI->BB->getParent()->getName() << ": ";
|
||||
ASSERTMESSAGE(Message);
|
||||
}
|
||||
return;
|
||||
|
@ -327,13 +327,13 @@ void SparseSolver::Solve(Function &F) {
|
||||
}
|
||||
|
||||
void SparseSolver::Print(Function &F, raw_ostream &OS) const {
|
||||
OS << "\nFUNCTION: " << F.getNameStr() << "\n";
|
||||
OS << "\nFUNCTION: " << F.getName() << "\n";
|
||||
for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB) {
|
||||
if (!BBExecutable.count(BB))
|
||||
OS << "INFEASIBLE: ";
|
||||
OS << "\t";
|
||||
if (BB->hasName())
|
||||
OS << BB->getNameStr() << ":\n";
|
||||
OS << BB->getName() << ":\n";
|
||||
else
|
||||
OS << "; anon bb\n";
|
||||
for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ++I) {
|
||||
|
@ -34,7 +34,7 @@ Module *Trace::getModule() const {
|
||||
///
|
||||
void Trace::print(raw_ostream &O) const {
|
||||
Function *F = getFunction();
|
||||
O << "; Trace from function " << F->getNameStr() << ", blocks:\n";
|
||||
O << "; Trace from function " << F->getName() << ", blocks:\n";
|
||||
for (const_iterator i = begin(), e = end(); i != e; ++i) {
|
||||
O << "; ";
|
||||
WriteAsOperand(O, *i, true, getModule());
|
||||
|
@ -156,12 +156,12 @@ bool Printer::runOnFunction(Function &F) {
|
||||
|
||||
GCFunctionInfo *FD = &getAnalysis<GCModuleInfo>().getFunctionInfo(F);
|
||||
|
||||
OS << "GC roots for " << FD->getFunction().getNameStr() << ":\n";
|
||||
OS << "GC roots for " << FD->getFunction().getName() << ":\n";
|
||||
for (GCFunctionInfo::roots_iterator RI = FD->roots_begin(),
|
||||
RE = FD->roots_end(); RI != RE; ++RI)
|
||||
OS << "\t" << RI->Num << "\t" << RI->StackOffset << "[sp]\n";
|
||||
|
||||
OS << "GC safe points for " << FD->getFunction().getNameStr() << ":\n";
|
||||
OS << "GC safe points for " << FD->getFunction().getName() << ":\n";
|
||||
for (GCFunctionInfo::iterator PI = FD->begin(),
|
||||
PE = FD->end(); PI != PE; ++PI) {
|
||||
|
||||
|
@ -335,7 +335,7 @@ namespace llvm {
|
||||
DOTGraphTraits (bool isSimple=false) : DefaultDOTGraphTraits(isSimple) {}
|
||||
|
||||
static std::string getGraphName(const MachineFunction *F) {
|
||||
return "CFG for '" + F->getFunction()->getNameStr() + "' function";
|
||||
return "CFG for '" + F->getFunction()->getName().str() + "' function";
|
||||
}
|
||||
|
||||
std::string getNodeLabel(const MachineBasicBlock *Node,
|
||||
|
@ -320,7 +320,7 @@ void MachineVerifier::report(const char *msg, const MachineFunction *MF) {
|
||||
MF->print(*OS, Indexes);
|
||||
}
|
||||
*OS << "*** Bad machine code: " << msg << " ***\n"
|
||||
<< "- function: " << MF->getFunction()->getNameStr() << "\n";
|
||||
<< "- function: " << MF->getFunction()->getName() << "\n";
|
||||
}
|
||||
|
||||
void MachineVerifier::report(const char *msg, const MachineBasicBlock *MBB) {
|
||||
|
@ -248,8 +248,8 @@ bool PostRAScheduler::runOnMachineFunction(MachineFunction &Fn) {
|
||||
static int bbcnt = 0;
|
||||
if (bbcnt++ % DebugDiv != DebugMod)
|
||||
continue;
|
||||
dbgs() << "*** DEBUG scheduling " << Fn.getFunction()->getNameStr() <<
|
||||
":BB#" << MBB->getNumber() << " ***\n";
|
||||
dbgs() << "*** DEBUG scheduling " << Fn.getFunction()->getName()
|
||||
<< ":BB#" << MBB->getNumber() << " ***\n";
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -476,8 +476,8 @@ void SelectionDAGISel::CodeGenAndEmitDAG() {
|
||||
#endif
|
||||
{
|
||||
BlockNumber = FuncInfo->MBB->getNumber();
|
||||
BlockName = MF->getFunction()->getNameStr() + ":" +
|
||||
FuncInfo->MBB->getBasicBlock()->getNameStr();
|
||||
BlockName = MF->getFunction()->getName().str() + ":" +
|
||||
FuncInfo->MBB->getBasicBlock()->getName().str();
|
||||
}
|
||||
DEBUG(dbgs() << "Initial selection DAG: BB#" << BlockNumber
|
||||
<< " '" << BlockName << "'\n"; CurDAG->dump());
|
||||
|
@ -158,7 +158,7 @@ void PEI::initShrinkWrappingInfo() {
|
||||
// via --shrink-wrap-func=<funcname>.
|
||||
#ifndef NDEBUG
|
||||
if (ShrinkWrapFunc != "") {
|
||||
std::string MFName = MF->getFunction()->getNameStr();
|
||||
std::string MFName = MF->getFunction()->getName().str();
|
||||
ShrinkWrapThisFunction = (MFName == ShrinkWrapFunc);
|
||||
}
|
||||
#endif
|
||||
@ -1045,7 +1045,7 @@ std::string PEI::getBasicBlockName(const MachineBasicBlock* MBB) {
|
||||
return "";
|
||||
|
||||
if (MBB->getBasicBlock())
|
||||
return MBB->getBasicBlock()->getNameStr();
|
||||
return MBB->getBasicBlock()->getName().str();
|
||||
|
||||
std::ostringstream name;
|
||||
name << "_MBB_" << MBB->getNumber();
|
||||
|
@ -358,9 +358,9 @@ getExplicitSectionGlobal(const GlobalValue *GV, SectionKind Kind,
|
||||
TAA, TAAParsed, StubSize);
|
||||
if (!ErrorCode.empty()) {
|
||||
// If invalid, report the error with report_fatal_error.
|
||||
report_fatal_error("Global variable '" + GV->getNameStr() +
|
||||
"' has an invalid section specifier '" + GV->getSection()+
|
||||
"': " + ErrorCode + ".");
|
||||
report_fatal_error("Global variable '" + GV->getName() +
|
||||
"' has an invalid section specifier '" +
|
||||
GV->getSection() + "': " + ErrorCode + ".");
|
||||
// Fall back to dropping it into the data section.
|
||||
return DataSection;
|
||||
}
|
||||
@ -379,9 +379,9 @@ getExplicitSectionGlobal(const GlobalValue *GV, SectionKind Kind,
|
||||
// to reject it here.
|
||||
if (S->getTypeAndAttributes() != TAA || S->getStubSize() != StubSize) {
|
||||
// If invalid, report the error with report_fatal_error.
|
||||
report_fatal_error("Global variable '" + GV->getNameStr() +
|
||||
"' section type or attributes does not match previous"
|
||||
" section specifier");
|
||||
report_fatal_error("Global variable '" + GV->getName() +
|
||||
"' section type or attributes does not match previous"
|
||||
" section specifier");
|
||||
}
|
||||
|
||||
return S;
|
||||
|
@ -94,15 +94,16 @@ static ExFunc lookupFunction(const Function *F) {
|
||||
FunctionType *FT = F->getFunctionType();
|
||||
for (unsigned i = 0, e = FT->getNumContainedTypes(); i != e; ++i)
|
||||
ExtName += getTypeID(FT->getContainedType(i));
|
||||
ExtName + "_" + F->getNameStr();
|
||||
ExtName += "_" + F->getName().str();
|
||||
|
||||
sys::ScopedLock Writer(*FunctionsLock);
|
||||
ExFunc FnPtr = FuncNames[ExtName];
|
||||
if (FnPtr == 0)
|
||||
FnPtr = FuncNames["lle_X_" + F->getNameStr()];
|
||||
FnPtr = FuncNames["lle_X_" + F->getName().str()];
|
||||
if (FnPtr == 0) // Try calling a generic function... if it exists...
|
||||
FnPtr = (ExFunc)(intptr_t)
|
||||
sys::DynamicLibrary::SearchForAddressOfSymbol("lle_X_"+F->getNameStr());
|
||||
sys::DynamicLibrary::SearchForAddressOfSymbol("lle_X_" +
|
||||
F->getName().str());
|
||||
if (FnPtr != 0)
|
||||
ExportedFunctions->insert(std::make_pair(F, FnPtr)); // Cache for later
|
||||
return FnPtr;
|
||||
|
@ -118,7 +118,7 @@ std::string JITDebugRegisterer::MakeELF(const Function *F, DebugInfo &I) {
|
||||
if (JITEmitDebugInfoToDisk) {
|
||||
std::string Filename;
|
||||
raw_string_ostream O2(Filename);
|
||||
O2 << "/tmp/llvm_function_" << I.FnStart << "_" << F->getNameStr() << ".o";
|
||||
O2 << "/tmp/llvm_function_" << I.FnStart << "_" << F->getName() << ".o";
|
||||
O2.flush();
|
||||
std::string Errors;
|
||||
raw_fd_ostream O3(Filename.c_str(), Errors);
|
||||
|
@ -74,7 +74,7 @@ namespace {
|
||||
|
||||
std::string getDescription() const {
|
||||
return std::string((IsArg ? "Argument #" : "Return value #"))
|
||||
+ utostr(Idx) + " of function " + F->getNameStr();
|
||||
+ utostr(Idx) + " of function " + F->getName().str();
|
||||
}
|
||||
};
|
||||
|
||||
|
@ -1902,7 +1902,7 @@ bool InstCombiner::DoOneIteration(Function &F, unsigned Iteration) {
|
||||
MadeIRChange = false;
|
||||
|
||||
DEBUG(errs() << "\n\nINSTCOMBINE ITERATION #" << Iteration << " on "
|
||||
<< F.getNameStr() << "\n");
|
||||
<< F.getName() << "\n");
|
||||
|
||||
{
|
||||
// Do a depth-first traversal of the function, populate the worklist with
|
||||
|
@ -69,7 +69,7 @@ inline static void printEdgeCounter(ProfileInfo::Edge e,
|
||||
BasicBlock* b,
|
||||
unsigned i) {
|
||||
DEBUG(dbgs() << "--Edge Counter for " << (e) << " in " \
|
||||
<< ((b)?(b)->getNameStr():"0") << " (# " << (i) << ")\n");
|
||||
<< ((b)?(b)->getName():"0") << " (# " << (i) << ")\n");
|
||||
}
|
||||
|
||||
bool OptimalEdgeProfiler::runOnModule(Module &M) {
|
||||
@ -127,7 +127,7 @@ bool OptimalEdgeProfiler::runOnModule(Module &M) {
|
||||
unsigned i = 0;
|
||||
for (Module::iterator F = M.begin(), E = M.end(); F != E; ++F) {
|
||||
if (F->isDeclaration()) continue;
|
||||
DEBUG(dbgs() << "Working on " << F->getNameStr() << "\n");
|
||||
DEBUG(dbgs() << "Working on " << F->getName() << "\n");
|
||||
|
||||
// Calculate a Maximum Spanning Tree with the edge weights determined by
|
||||
// ProfileEstimator. ProfileEstimator also assign weights to the virtual
|
||||
|
@ -665,7 +665,7 @@ void BLInstrumentationDag::unlinkPhony() {
|
||||
// Generate a .dot graph to represent the DAG and pathNumbers
|
||||
void BLInstrumentationDag::generateDotGraph() {
|
||||
std::string errorInfo;
|
||||
std::string functionName = getFunction().getNameStr();
|
||||
std::string functionName = getFunction().getName().str();
|
||||
std::string filename = "pathdag." + functionName + ".dot";
|
||||
|
||||
DEBUG (dbgs() << "Writing '" << filename << "'...\n");
|
||||
@ -750,7 +750,8 @@ Value* BLInstrumentationNode::getStartingPathNumber(){
|
||||
// Sets the Value of the pathNumber. Used by the instrumentation code.
|
||||
void BLInstrumentationNode::setStartingPathNumber(Value* pathNumber) {
|
||||
DEBUG(dbgs() << " SPN-" << getName() << " <-- " << (pathNumber ?
|
||||
pathNumber->getNameStr() : "unused") << "\n");
|
||||
pathNumber->getName() :
|
||||
"unused") << "\n");
|
||||
_startingPathNumber = pathNumber;
|
||||
}
|
||||
|
||||
@ -760,7 +761,7 @@ Value* BLInstrumentationNode::getEndingPathNumber(){
|
||||
|
||||
void BLInstrumentationNode::setEndingPathNumber(Value* pathNumber) {
|
||||
DEBUG(dbgs() << " EPN-" << getName() << " <-- "
|
||||
<< (pathNumber ? pathNumber->getNameStr() : "unused") << "\n");
|
||||
<< (pathNumber ? pathNumber->getName() : "unused") << "\n");
|
||||
_endingPathNumber = pathNumber;
|
||||
}
|
||||
|
||||
@ -1239,9 +1240,9 @@ void PathProfiler::insertInstrumentation(
|
||||
insertPoint++;
|
||||
|
||||
DEBUG(dbgs() << "\nInstrumenting method call block '"
|
||||
<< node->getBlock()->getNameStr() << "'\n");
|
||||
<< node->getBlock()->getName() << "'\n");
|
||||
DEBUG(dbgs() << " Path number initialized: "
|
||||
<< ((node->getStartingPathNumber()) ? "yes" : "no") << "\n");
|
||||
<< ((node->getStartingPathNumber()) ? "yes" : "no") << "\n");
|
||||
|
||||
Value* newpn;
|
||||
if( node->getStartingPathNumber() ) {
|
||||
@ -1370,7 +1371,7 @@ bool PathProfiler::runOnModule(Module &M) {
|
||||
if (F->isDeclaration())
|
||||
continue;
|
||||
|
||||
DEBUG(dbgs() << "Function: " << F->getNameStr() << "\n");
|
||||
DEBUG(dbgs() << "Function: " << F->getName() << "\n");
|
||||
functionNumber++;
|
||||
|
||||
// set function number
|
||||
|
@ -66,7 +66,7 @@ Value::~Value() {
|
||||
// a <badref>
|
||||
//
|
||||
if (!use_empty()) {
|
||||
dbgs() << "While deleting: " << *VTy << " %" << getNameStr() << "\n";
|
||||
dbgs() << "While deleting: " << *VTy << " %" << getName() << "\n";
|
||||
for (use_iterator I = use_begin(), E = use_end(); I != E; ++I)
|
||||
dbgs() << "Use still stuck around after Def is destroyed:"
|
||||
<< **I << "\n";
|
||||
@ -554,7 +554,7 @@ void ValueHandleBase::ValueIsDeleted(Value *V) {
|
||||
// All callbacks, weak references, and assertingVHs should be dropped by now.
|
||||
if (V->HasValueHandle) {
|
||||
#ifndef NDEBUG // Only in +Asserts mode...
|
||||
dbgs() << "While deleting: " << *V->getType() << " %" << V->getNameStr()
|
||||
dbgs() << "While deleting: " << *V->getType() << " %" << V->getName()
|
||||
<< "\n";
|
||||
if (pImpl->ValueHandles[V]->getKind() == Assert)
|
||||
llvm_unreachable("An asserting value handle still pointed to this"
|
||||
@ -617,8 +617,8 @@ void ValueHandleBase::ValueIsRAUWd(Value *Old, Value *New) {
|
||||
case Tracking:
|
||||
case Weak:
|
||||
dbgs() << "After RAUW from " << *Old->getType() << " %"
|
||||
<< Old->getNameStr() << " to " << *New->getType() << " %"
|
||||
<< New->getNameStr() << "\n";
|
||||
<< Old->getName() << " to " << *New->getType() << " %"
|
||||
<< New->getName() << "\n";
|
||||
llvm_unreachable("A tracking or weak value handle still pointed to the"
|
||||
" old value!\n");
|
||||
default:
|
||||
|
@ -340,7 +340,7 @@ Module *BugDriver::ExtractMappedBlocksFromModule(const
|
||||
// If the BB doesn't have a name, give it one so we have something to key
|
||||
// off of.
|
||||
if (!BB->hasName()) BB->setName("tmpbb");
|
||||
BlocksToNotExtractFile.os() << BB->getParent()->getNameStr() << " "
|
||||
BlocksToNotExtractFile.os() << BB->getParent()->getName() << " "
|
||||
<< BB->getName() << "\n";
|
||||
}
|
||||
BlocksToNotExtractFile.os().close();
|
||||
|
@ -200,9 +200,9 @@ bool ProfileInfoPrinterPass::runOnModule(Module &M) {
|
||||
}
|
||||
|
||||
outs() << format("%3d", i+1) << ". "
|
||||
<< format("%5.2g", FunctionCounts[i].second) << "/"
|
||||
<< format("%g", TotalExecutions) << " "
|
||||
<< FunctionCounts[i].first->getNameStr() << "\n";
|
||||
<< format("%5.2g", FunctionCounts[i].second) << "/"
|
||||
<< format("%g", TotalExecutions) << " "
|
||||
<< FunctionCounts[i].first->getName() << "\n";
|
||||
}
|
||||
|
||||
std::set<Function*> FunctionsToPrint;
|
||||
@ -225,12 +225,12 @@ bool ProfileInfoPrinterPass::runOnModule(Module &M) {
|
||||
for (unsigned i = 0; i != BlocksToPrint; ++i) {
|
||||
if (Counts[i].second == 0) break;
|
||||
Function *F = Counts[i].first->getParent();
|
||||
outs() << format("%3d", i+1) << ". "
|
||||
<< format("%5g", Counts[i].second/(double)TotalExecutions*100) << "% "
|
||||
<< format("%5.0f", Counts[i].second) << "/"
|
||||
<< format("%g", TotalExecutions) << "\t"
|
||||
<< F->getNameStr() << "() - "
|
||||
<< Counts[i].first->getNameStr() << "\n";
|
||||
outs() << format("%3d", i+1) << ". "
|
||||
<< format("%5g", Counts[i].second/(double)TotalExecutions*100)<<"% "
|
||||
<< format("%5.0f", Counts[i].second) << "/"
|
||||
<< format("%g", TotalExecutions) << "\t"
|
||||
<< F->getName() << "() - "
|
||||
<< Counts[i].first->getName() << "\n";
|
||||
FunctionsToPrint.insert(F);
|
||||
}
|
||||
|
||||
|
@ -101,8 +101,8 @@ bool CallGraphSCC::runOnModule(Module &M) {
|
||||
errs() << "\nSCC #" << ++sccNum << " : ";
|
||||
for (std::vector<CallGraphNode*>::const_iterator I = nextSCC.begin(),
|
||||
E = nextSCC.end(); I != E; ++I)
|
||||
errs() << ((*I)->getFunction() ? (*I)->getFunction()->getNameStr()
|
||||
: std::string("external node")) << ", ";
|
||||
errs() << ((*I)->getFunction() ? (*I)->getFunction()->getName()
|
||||
: "external node") << ", ";
|
||||
if (nextSCC.size() == 1 && SCCI.hasLoop())
|
||||
errs() << " (Has self-loop).";
|
||||
}
|
||||
|
@ -291,8 +291,8 @@ struct RegionPassPrinter : public RegionPass {
|
||||
virtual bool runOnRegion(Region *R, RGPassManager &RGM) {
|
||||
if (!Quiet) {
|
||||
Out << "Printing analysis '" << PassToPrint->getPassName() << "' for "
|
||||
<< "region: '" << R->getNameStr() << "' in function '"
|
||||
<< R->getEntry()->getParent()->getNameStr() << "':\n";
|
||||
<< "region: '" << R->getNameStr() << "' in function '"
|
||||
<< R->getEntry()->getParent()->getName() << "':\n";
|
||||
}
|
||||
// Get and print pass...
|
||||
getAnalysisID<Pass>(PassToPrint->getTypeInfo()).print(Out,
|
||||
|
Loading…
Reference in New Issue
Block a user