forked from OSchip/llvm-project
Print function names under --polly-report
llvm-svn: 176446
This commit is contained in:
parent
fd5ef42830
commit
b2863ca2dc
|
@ -214,7 +214,7 @@ class ScopDetection : public FunctionPass {
|
||||||
std::string &FileName);
|
std::string &FileName);
|
||||||
|
|
||||||
/// @brief Print the locations of all detected scops.
|
/// @brief Print the locations of all detected scops.
|
||||||
void printLocations();
|
void printLocations(llvm::Function &F);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static char ID;
|
static char ID;
|
||||||
|
|
|
@ -590,7 +590,12 @@ void ScopDetection::getDebugLocation(const Region *R, unsigned &LineBegin,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScopDetection::printLocations() {
|
void ScopDetection::printLocations(llvm::Function &F) {
|
||||||
|
int NumberOfScops = std::distance(begin(), end());
|
||||||
|
|
||||||
|
if (NumberOfScops)
|
||||||
|
outs() << ":: Static control regions in " << F.getName() << "\n";
|
||||||
|
|
||||||
for (iterator RI = begin(), RE = end(); RI != RE; ++RI) {
|
for (iterator RI = begin(), RE = end(); RI != RE; ++RI) {
|
||||||
unsigned LineEntry, LineExit;
|
unsigned LineEntry, LineExit;
|
||||||
std::string FileName;
|
std::string FileName;
|
||||||
|
@ -603,8 +608,9 @@ void ScopDetection::printLocations() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
outs() << FileName << ":" << LineEntry << ": Scop start\n";
|
outs() << FileName << ":" << LineEntry
|
||||||
outs() << FileName << ":" << LineExit << ": Scop end\n";
|
<< ": Start of static control region\n";
|
||||||
|
outs() << FileName << ":" << LineExit << ": End of static control region\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -626,7 +632,7 @@ bool ScopDetection::runOnFunction(llvm::Function &F) {
|
||||||
findScops(*TopRegion);
|
findScops(*TopRegion);
|
||||||
|
|
||||||
if (ReportLevel >= 1)
|
if (ReportLevel >= 1)
|
||||||
printLocations();
|
printLocations(F);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue