diff options
| author | Michael Kruse <llvm@meinersbur.de> | 2017-11-06 17:48:14 +0000 |
|---|---|---|
| committer | Michael Kruse <llvm@meinersbur.de> | 2017-11-06 17:48:14 +0000 |
| commit | 4d3f3c72062e51e049b2043af9fa0e681b9ecb19 (patch) | |
| tree | a24b3e1c61ddfd1192b592e78da0cbadb02f67ac /polly/lib | |
| parent | adbf476a8806cdc62bde5e182033cf72e7252798 (diff) | |
| download | bcm5719-llvm-4d3f3c72062e51e049b2043af9fa0e681b9ecb19.tar.gz bcm5719-llvm-4d3f3c72062e51e049b2043af9fa0e681b9ecb19.zip | |
[ForwardOpTree] Limit isl operations of known content reload.
Put the analysis part of reloadKnownContent under an isl
max-operations quota scope, as has already been done for
forwardKnownLoad.
This should fix the aosp timeout of "GrTestUtils.cpp".
llvm-svn: 317495
Diffstat (limited to 'polly/lib')
| -rw-r--r-- | polly/lib/Transform/ForwardOpTree.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/polly/lib/Transform/ForwardOpTree.cpp b/polly/lib/Transform/ForwardOpTree.cpp index 65655d5e755..d31940dca85 100644 --- a/polly/lib/Transform/ForwardOpTree.cpp +++ b/polly/lib/Transform/ForwardOpTree.cpp @@ -576,7 +576,8 @@ public: Loop *DefLoop, isl::map DefToTarget, bool DoIt) { // Cannot do anything without successful known analysis. - if (Known.is_null()) + if (Known.is_null() || Translator.is_null() || UseToTarget.is_null() || + DefToTarget.is_null() || MaxOpGuard.hasQuotaExceeded()) return FD_NotApplicable; MemoryAccess *Access = TargetStmt->lookupInputAccessOf(Inst); @@ -586,6 +587,12 @@ public: return FD_CanForwardLeaf; } + // Don't spend too much time analyzing whether it can be reloaded. When + // carrying-out the forwarding, we cannot bail-out in the middle of the + // transformation. It also shouldn't take as long because some results are + // cached. + IslQuotaScope QuotaScope = MaxOpGuard.enter(!DoIt); + // { DomainDef[] -> ValInst[] } isl::union_map ExpectedVal = makeNormalizedValInst(Inst, UseStmt, UseLoop); |

