summaryrefslogtreecommitdiffstats
path: root/polly
diff options
context:
space:
mode:
authorTobias Grosser <grosser@fim.uni-passau.de>2013-03-04 19:49:51 +0000
committerTobias Grosser <grosser@fim.uni-passau.de>2013-03-04 19:49:51 +0000
commitb2863ca2dc5524d249813d5185558a9c05f84c92 (patch)
treea61f64cd5572ba9a6742340a1ce28d92c7215ef6 /polly
parentfd5ef42830a8be56234fffe9435723addc2d69d6 (diff)
downloadbcm5719-llvm-b2863ca2dc5524d249813d5185558a9c05f84c92.tar.gz
bcm5719-llvm-b2863ca2dc5524d249813d5185558a9c05f84c92.zip
Print function names under --polly-report
llvm-svn: 176446
Diffstat (limited to 'polly')
-rwxr-xr-xpolly/include/polly/ScopDetection.h2
-rw-r--r--polly/lib/Analysis/ScopDetection.cpp14
2 files changed, 11 insertions, 5 deletions
diff --git a/polly/include/polly/ScopDetection.h b/polly/include/polly/ScopDetection.h
index 300beb208df..bb0d881b174 100755
--- a/polly/include/polly/ScopDetection.h
+++ b/polly/include/polly/ScopDetection.h
@@ -214,7 +214,7 @@ class ScopDetection : public FunctionPass {
std::string &FileName);
/// @brief Print the locations of all detected scops.
- void printLocations();
+ void printLocations(llvm::Function &F);
public:
static char ID;
diff --git a/polly/lib/Analysis/ScopDetection.cpp b/polly/lib/Analysis/ScopDetection.cpp
index ef4eeac61b8..5d7f0d5a2c6 100644
--- a/polly/lib/Analysis/ScopDetection.cpp
+++ b/polly/lib/Analysis/ScopDetection.cpp
@@ -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) {
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::Function &F) {
findScops(*TopRegion);
if (ReportLevel >= 1)
- printLocations();
+ printLocations(F);
return false;
}
OpenPOWER on IntegriCloud