diff options
| author | Tobias Grosser <tobias@grosser.es> | 2017-05-19 12:13:02 +0000 |
|---|---|---|
| committer | Tobias Grosser <tobias@grosser.es> | 2017-05-19 12:13:02 +0000 |
| commit | d8945baa0a44eb29da0c2244f2fc2dfa8645d041 (patch) | |
| tree | 98e4ac30a90c0b9053a5ee96b6aa61452d6e0c79 /polly/lib/Analysis/ScopDetection.cpp | |
| parent | 8b9897fff444e884c59163a7ba4d93608753e924 (diff) | |
| download | bcm5719-llvm-d8945baa0a44eb29da0c2244f2fc2dfa8645d041.tar.gz bcm5719-llvm-d8945baa0a44eb29da0c2244f2fc2dfa8645d041.zip | |
[ScopDetection] Allow detection of full functions
This is useful when only analyzing functions.
llvm-svn: 303420
Diffstat (limited to 'polly/lib/Analysis/ScopDetection.cpp')
| -rw-r--r-- | polly/lib/Analysis/ScopDetection.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/polly/lib/Analysis/ScopDetection.cpp b/polly/lib/Analysis/ScopDetection.cpp index b8df3940a24..a5fcc163484 100644 --- a/polly/lib/Analysis/ScopDetection.cpp +++ b/polly/lib/Analysis/ScopDetection.cpp @@ -96,6 +96,11 @@ static cl::opt<std::string> OnlyFunction( cl::value_desc("string"), cl::ValueRequired, cl::init(""), cl::cat(PollyCategory)); +static cl::opt<bool> + AllowFullFunction("polly-detect-full-functions", + cl::desc("Allow the detection of full functions"), + cl::init(false), cl::cat(PollyCategory)); + static cl::opt<std::string> OnlyRegion( "polly-only-region", cl::desc("Only run on certain regions (The provided identifier must " @@ -1502,8 +1507,9 @@ bool ScopDetection::isValidRegion(DetectionContext &Context) const { // SCoP cannot contain the entry block of the function, because we need // to insert alloca instruction there when translate scalar to array. - if (CurRegion.getEntry() == - &(CurRegion.getEntry()->getParent()->getEntryBlock())) + if (!AllowFullFunction && + CurRegion.getEntry() == + &(CurRegion.getEntry()->getParent()->getEntryBlock())) return invalid<ReportEntry>(Context, /*Assert=*/true, CurRegion.getEntry()); if (!allBlocksValid(Context)) |

