diff options
author | Linux Build Service Account <lnxbuild@localhost> | 2022-01-16 14:01:36 -0800 |
---|---|---|
committer | Linux Build Service Account <lnxbuild@localhost> | 2022-01-16 14:01:36 -0800 |
commit | 5806f26e603150889d7b7e044cd8fb685c832f4e (patch) | |
tree | e60b0a64a2b342e96f6b886ec3e2e453e494e567 /compiler/optimizing/execution_subgraph.cc | |
parent | aa20688e701376b1a4cfffc6284721819806cb90 (diff) | |
parent | f9da627a42193f596d33d799bf323fced18214c5 (diff) |
Merge f9da627a42193f596d33d799bf323fced18214c5 on remote branch
Change-Id: Iaf48868208da271af8b4536f089c44bf4412cc9e
Diffstat (limited to 'compiler/optimizing/execution_subgraph.cc')
-rw-r--r-- | compiler/optimizing/execution_subgraph.cc | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/compiler/optimizing/execution_subgraph.cc b/compiler/optimizing/execution_subgraph.cc index 6d105668c0..66fdfcda5b 100644 --- a/compiler/optimizing/execution_subgraph.cc +++ b/compiler/optimizing/execution_subgraph.cc @@ -86,12 +86,6 @@ void ExecutionSubgraph::Prune() { ScopedArenaVector<std::bitset<kMaxFilterableSuccessors>> results( graph_->GetBlocks().size(), temporaries.Adapter(kArenaAllocLSA)); unreachable_blocks_.ClearAllBits(); - // TODO We should support infinite loops as well. - if (UNLIKELY(graph_->GetExitBlock() == nullptr)) { - // Infinite loop - valid_ = false; - return; - } // Fills up the 'results' map with what we need to add to update // allowed_successors in order to prune sink nodes. bool start_reaches_end = false; @@ -170,8 +164,11 @@ void ExecutionSubgraph::Prune() { << "current path size: " << current_path.size() << " cur_block id: " << cur_block->GetBlockId() << " entry id " << graph_->GetEntryBlock()->GetBlockId(); - DCHECK(!visiting.IsBitSet(id)) - << "Somehow ended up in a loop! This should have been caught before now! " << id; + if (visiting.IsBitSet(id)) { + // TODO We should support infinite loops as well. + start_reaches_end = false; + break; + } std::bitset<kMaxFilterableSuccessors>& result = results[id]; if (cur_block == graph_->GetExitBlock()) { start_reaches_end = true; |