summaryrefslogtreecommitdiffstats
path: root/polly/lib/Analysis/ScopDetection.cpp
diff options
context:
space:
mode:
authorTobias Grosser <grosser@fim.uni-passau.de>2011-10-23 11:17:06 +0000
committerTobias Grosser <grosser@fim.uni-passau.de>2011-10-23 11:17:06 +0000
commit2ff8723d5d586208f0248b1a152aa2d964573fc1 (patch)
tree959377f0513b9faa91e73660c2392dc1e82d0f92 /polly/lib/Analysis/ScopDetection.cpp
parentf3fbcb8919d13fd988095b3997d44f326b73186d (diff)
downloadbcm5719-llvm-2ff8723d5d586208f0248b1a152aa2d964573fc1.tar.gz
bcm5719-llvm-2ff8723d5d586208f0248b1a152aa2d964573fc1.zip
ScopDetection: Allow to limit the scop detection to a single function
-polly-detect-only=<functionname> allows to limit the scop detection to a single function. llvm-svn: 142750
Diffstat (limited to 'polly/lib/Analysis/ScopDetection.cpp')
-rw-r--r--polly/lib/Analysis/ScopDetection.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/polly/lib/Analysis/ScopDetection.cpp b/polly/lib/Analysis/ScopDetection.cpp
index 083ad439f84..ab9720c6741 100644
--- a/polly/lib/Analysis/ScopDetection.cpp
+++ b/polly/lib/Analysis/ScopDetection.cpp
@@ -63,6 +63,13 @@
using namespace llvm;
using namespace polly;
+static cl::opt<std::string>
+OnlyFunction("polly-detect-only",
+ cl::desc("Only detect scops in function"), cl::Hidden,
+ cl::value_desc("The function name to detect scops in"),
+ cl::ValueRequired, cl::init(""));
+
+
//===----------------------------------------------------------------------===//
// Statistics.
@@ -553,6 +560,11 @@ bool ScopDetection::runOnFunction(llvm::Function &F) {
RI = &getAnalysis<RegionInfo>();
Region *TopRegion = RI->getTopLevelRegion();
+ releaseMemory();
+
+ if (OnlyFunction != "" && F.getNameStr() != OnlyFunction)
+ return false;
+
if(!isValidFunction(F))
return false;
OpenPOWER on IntegriCloud