[polly] r208190 - Catch all functions containing a certain string

Tobias Grosser tobias at grosser.es
Wed May 7 04:23:32 PDT 2014


Author: grosser
Date: Wed May  7 06:23:32 2014
New Revision: 208190

URL: http://llvm.org/viewvc/llvm-project?rev=208190&view=rev
Log:
Catch all functions containing a certain string

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=208190&r1=208189&r2=208190&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopDetection.cpp (original)
+++ polly/trunk/lib/Analysis/ScopDetection.cpp Wed May  7 06:23:32 2014
@@ -82,8 +82,9 @@ DetectRegionsWithoutLoops("polly-detect-
                           cl::cat(PollyCategory));
 
 static cl::opt<std::string>
-OnlyFunction("polly-only-func", cl::desc("Only run on a single function"),
-             cl::value_desc("function-name"), cl::ValueRequired, cl::init(""),
+OnlyFunction("polly-only-func",
+             cl::desc("Only run on functions that contain a certain string"),
+             cl::value_desc("string"), cl::ValueRequired, cl::init(""),
              cl::cat(PollyCategory));
 
 static cl::opt<std::string>
@@ -730,7 +731,7 @@ bool ScopDetection::runOnFunction(llvm::
 
   releaseMemory();
 
-  if (OnlyFunction != "" && F.getName() != OnlyFunction)
+  if (OnlyFunction != "" && !F.getName().count(OnlyFunction))
     return false;
 
   if (!isValidFunction(F))





More information about the llvm-commits mailing list