[polly] r201592 - Add ScopDetection::isValidRegion(Region)

Tobias Grosser tobias at grosser.es
Tue Feb 18 10:49:46 PST 2014


Author: grosser
Date: Tue Feb 18 12:49:46 2014
New Revision: 201592

URL: http://llvm.org/viewvc/llvm-project?rev=201592&view=rev
Log:
Add ScopDetection::isValidRegion(Region)

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=201592&r1=201591&r2=201592&view=diff
==============================================================================
--- polly/trunk/include/polly/ScopDetection.h (original)
+++ polly/trunk/include/polly/ScopDetection.h Tue Feb 18 12:49:46 2014
@@ -141,6 +141,13 @@ class ScopDetection : public FunctionPas
   /// @return True if R is a Scop, false otherwise.
   bool isValidRegion(DetectionContext &Context) const;
 
+  /// @brief Check if a region is a Scop.
+  ///
+  /// @param Context The context of scop detection.
+  ///
+  /// @return True if R is a Scop, false otherwise.
+  bool isValidRegion(Region &R) const;
+
   /// @brief Check if a call instruction can be part of a Scop.
   ///
   /// @param CI The call instruction to check.

Modified: polly/trunk/lib/Analysis/ScopDetection.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Analysis/ScopDetection.cpp?rev=201592&r1=201591&r2=201592&view=diff
==============================================================================
--- polly/trunk/lib/Analysis/ScopDetection.cpp (original)
+++ polly/trunk/lib/Analysis/ScopDetection.cpp Tue Feb 18 12:49:46 2014
@@ -613,11 +613,9 @@ void ScopDetection::findScops(Region &R)
   if (!DetectRegionsWithoutLoops && regionWithoutLoops(R, LI))
     return;
 
-  DetectionContext Context(R, *AA, false /*verifying*/);
-
   LastFailure = "";
 
-  if (isValidRegion(Context)) {
+  if (isValidRegion(R)) {
     ++ValidRegion;
     ValidRegions.insert(&R);
     return;
@@ -704,6 +702,11 @@ bool ScopDetection::isValidExit(Detectio
   return true;
 }
 
+bool ScopDetection::isValidRegion(Region &R) const {
+  DetectionContext Context(R, *AA, false /*verifying*/);
+  return isValidRegion(Context);
+}
+
 bool ScopDetection::isValidRegion(DetectionContext &Context) const {
   Region &R = Context.CurRegion;
 





More information about the llvm-commits mailing list