[polly] r176446 - Print function names under --polly-report
Tobias Grosser
grosser at fim.uni-passau.de
Mon Mar 4 11:49:51 PST 2013
Author: grosser
Date: Mon Mar 4 13:49:51 2013
New Revision: 176446
URL: http://llvm.org/viewvc/llvm-project?rev=176446&view=rev
Log:
Print function names under --polly-report
Modified:
polly/trunk/include/polly/ScopDetection.h
polly/trunk/lib/Analysis/ScopDetection.cpp
Modified: polly/trunk/include/polly/ScopDetection.h
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/include/polly/ScopDetection.h?rev=176446&r1=176445&r2=176446&view=diff
==============================================================================
--- polly/trunk/include/polly/ScopDetection.h (original)
+++ polly/trunk/include/polly/ScopDetection.h Mon Mar 4 13:49:51 2013
@@ -214,7 +214,7 @@ class ScopDetection : public FunctionPas
std::string &FileName);
/// @brief Print the locations of all detected scops.
- void printLocations();
+ void printLocations(llvm::Function &F);
public:
static char ID;
Modified: polly/trunk/lib/Analysis/ScopDetection.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopDetection.cpp?rev=176446&r1=176445&r2=176446&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopDetection.cpp (original)
+++ polly/trunk/lib/Analysis/ScopDetection.cpp Mon Mar 4 13:49:51 2013
@@ -590,7 +590,12 @@ void ScopDetection::getDebugLocation(con
}
}
-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) {
unsigned LineEntry, LineExit;
std::string FileName;
@@ -603,8 +608,9 @@ void ScopDetection::printLocations() {
return;
}
- outs() << FileName << ":" << LineEntry << ": Scop start\n";
- outs() << FileName << ":" << LineExit << ": Scop end\n";
+ outs() << FileName << ":" << LineEntry
+ << ": Start of static control region\n";
+ outs() << FileName << ":" << LineExit << ": End of static control region\n";
}
}
@@ -626,7 +632,7 @@ bool ScopDetection::runOnFunction(llvm::
findScops(*TopRegion);
if (ReportLevel >= 1)
- printLocations();
+ printLocations(F);
return false;
}
More information about the llvm-commits
mailing list