diff options
author | Michael Kruse <llvm-project@meinersbur.de> | 2021-08-13 12:26:35 -0500 |
---|---|---|
committer | Michael Kruse <llvm-project@meinersbur.de> | 2021-08-13 12:44:37 -0500 |
commit | 0232c1d10dd79f5c8f9530d636655488eb3c9e7e (patch) | |
tree | 390ba91439f9c05316cbeb562747d0f9375d2fe4 /polly/include | |
parent | 581a80304c671b6cb2b1b1f87feb9fbe14875f2a (diff) | |
download | llvm-0232c1d10dd79f5c8f9530d636655488eb3c9e7e.tar.gz |
[Polly] Decompose object construction and detection algorithm. NFC.
Avoid doing the detection work inside the constructor. In addition to
polymorphism being unintuitive in constructors and other design problems
such as if an exception is thrown, the ScopDetection class is usable
without detection in the sense of "no Scop found" or "function skipped".
Diffstat (limited to 'polly/include')
-rw-r--r-- | polly/include/polly/ScopDetection.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/polly/include/polly/ScopDetection.h b/polly/include/polly/ScopDetection.h index 86a3a8e1a6d0..df9e275c59c2 100644 --- a/polly/include/polly/ScopDetection.h +++ b/polly/include/polly/ScopDetection.h @@ -497,7 +497,7 @@ private: /// Check if the function @p F is marked as invalid. /// /// @note An OpenMP subfunction will be marked as invalid. - bool isValidFunction(Function &F); + static bool isValidFunction(Function &F); /// Can ISL compute the trip count of a loop. /// @@ -529,9 +529,10 @@ private: Args &&...Arguments) const; public: - ScopDetection(Function &F, const DominatorTree &DT, ScalarEvolution &SE, - LoopInfo &LI, RegionInfo &RI, AAResults &AA, - OptimizationRemarkEmitter &ORE); + ScopDetection(const DominatorTree &DT, ScalarEvolution &SE, LoopInfo &LI, + RegionInfo &RI, AAResults &AA, OptimizationRemarkEmitter &ORE); + + void detect(Function &F); /// Get the RegionInfo stored in this pass. /// |