diff options
author | Tobias Grosser <tobias@grosser.es> | 2017-04-28 19:08:20 +0000 |
---|---|---|
committer | Tobias Grosser <tobias@grosser.es> | 2017-04-28 19:08:20 +0000 |
commit | d439911f73e303383570fe05dc908c3442f678c4 (patch) | |
tree | a9cd80474c5eceeefa517315a72a53b382dfb96a /polly/lib/CodeGen/CodeGeneration.cpp | |
parent | 72408fb2ac313288856c52e613274cbe321dd48e (diff) | |
download | bcm5719-llvm-d439911f73e303383570fe05dc908c3442f678c4.tar.gz bcm5719-llvm-d439911f73e303383570fe05dc908c3442f678c4.zip |
[CodeGen] Skip verify if -polly-codegen-verify is set to false
Before this change, we always tried to verify the function and printed
verification errors, but just did not abort in case -polly-codegen-verify=false
was set and verification failed. As verification can become very cosly -- for
large functions with many scops we may verify the very same function very often
-- this can affect compile time very negatively. Hence, we respect the
-polly-codegen-verify flag with this check, ensuring that no verification is run
if -polly-codegen-verify=false.
This reduces code generation time from 26 seconds to 4 seconds on the test
case below with -polly-codegen-verify=false:
struct X { int x; };
void a();
#define SIG (int x, X **y, X **z)
typedef void (*fn)SIG;
#define FN { for (int i = 0; i < x; ++i) { (*y)[i].x += (*z)[i].x; } a(); }
#define FN5 FN FN FN FN FN
#define FN25 FN5 FN5 FN5 FN5
#define FN125 FN25 FN25 FN25 FN25 FN25
#define FN250 FN125 FN125
#define FN1250 FN250 FN250 FN250 FN250 FN250
void x SIG { FN1250 }
llvm-svn: 301669
Diffstat (limited to 'polly/lib/CodeGen/CodeGeneration.cpp')
-rw-r--r-- | polly/lib/CodeGen/CodeGeneration.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/polly/lib/CodeGen/CodeGeneration.cpp b/polly/lib/CodeGen/CodeGeneration.cpp index ea98ef740ad..e1d28b34d21 100644 --- a/polly/lib/CodeGen/CodeGeneration.cpp +++ b/polly/lib/CodeGen/CodeGeneration.cpp @@ -72,7 +72,7 @@ public: ///} void verifyGeneratedFunction(Scop &S, Function &F) { - if (!verifyFunction(F, &errs()) || !Verify) + if (!Verify || !verifyFunction(F, &errs())) return; DEBUG({ |