[polly] r200224 - Detection: Allow to filter the regions that can be detected
Tobias Grosser
tobias at grosser.es
Mon Jan 27 06:24:53 PST 2014
Author: grosser
Date: Mon Jan 27 08:24:53 2014
New Revision: 200224
URL: http://llvm.org/viewvc/llvm-project?rev=200224&view=rev
Log:
Detection: Allow to filter the regions that can be detected
Modified:
polly/trunk/lib/Analysis/ScopDetection.cpp
Modified: polly/trunk/lib/Analysis/ScopDetection.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopDetection.cpp?rev=200224&r1=200223&r2=200224&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopDetection.cpp (original)
+++ polly/trunk/lib/Analysis/ScopDetection.cpp Mon Jan 27 08:24:53 2014
@@ -84,6 +84,13 @@ OnlyFunction("polly-only-func", cl::desc
cl::value_desc("function-name"), cl::ValueRequired, cl::init(""),
cl::cat(PollyCategory));
+static cl::opt<std::string>
+OnlyRegion("polly-only-region",
+ cl::desc("Only run on certain regions (The provided identifier must "
+ "appear in the name of the region's entry block"),
+ cl::value_desc("identifier"), cl::ValueRequired, cl::init(""),
+ cl::cat(PollyCategory));
+
static cl::opt<bool>
IgnoreAliasing("polly-ignore-aliasing",
cl::desc("Ignore possible aliasing of the array bases"),
@@ -626,12 +633,19 @@ bool ScopDetection::isValidRegion(Detect
DEBUG(dbgs() << "Checking region: " << R.getNameStr() << "\n\t");
- // The toplevel region is no valid region.
if (R.isTopLevelRegion()) {
DEBUG(dbgs() << "Top level region is invalid"; dbgs() << "\n");
return false;
}
+ if (!R.getEntry()->getName().count(OnlyRegion)) {
+ DEBUG({
+ dbgs() << "Region entry does not match -polly-region-only";
+ dbgs() << "\n";
+ });
+ return false;
+ }
+
if (!R.getEnteringBlock()) {
BasicBlock *entry = R.getEntry();
Loop *L = LI->getLoopFor(entry);
More information about the llvm-commits
mailing list