/// @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.
if (!DetectRegionsWithoutLoops && regionWithoutLoops(R, LI))
return;
- DetectionContext Context(R, *AA, false /*verifying*/);
-
LastFailure = "";
- if (isValidRegion(Context)) {
+ if (isValidRegion(R)) {
++ValidRegion;
ValidRegions.insert(&R);
return;
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;