diff options
| author | 2018-01-22 21:04:20 +0000 | |
|---|---|---|
| committer | 2018-01-22 21:04:20 +0000 | |
| commit | 7b4c09a39fd1b43995aa6d68958113463bc5b82b (patch) | |
| tree | 2fad44f5bbb1234bb0cc07312dac252deeca2edb /compiler/optimizing/nodes.cc | |
| parent | c7ae623f113484f42facd560756b13f34f7eab68 (diff) | |
| parent | 7f4aff6705f46f411874b5ca8c4856b8ed5bfb13 (diff) | |
Merge "ART: Implement SuperblockCloner."
Diffstat (limited to 'compiler/optimizing/nodes.cc')
| -rw-r--r-- | compiler/optimizing/nodes.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/compiler/optimizing/nodes.cc b/compiler/optimizing/nodes.cc index 727431a493..91e475d737 100644 --- a/compiler/optimizing/nodes.cc +++ b/compiler/optimizing/nodes.cc @@ -865,6 +865,15 @@ void HLoopInformation::Populate() { graph->SetHasLoops(true); } +void HLoopInformation::PopulateInnerLoopUpwards(HLoopInformation* inner_loop) { + DCHECK(inner_loop->GetPreHeader()->GetLoopInformation() == this); + blocks_.Union(&inner_loop->blocks_); + HLoopInformation* outer_loop = GetPreHeader()->GetLoopInformation(); + if (outer_loop != nullptr) { + outer_loop->PopulateInnerLoopUpwards(this); + } +} + HBasicBlock* HLoopInformation::GetPreHeader() const { HBasicBlock* block = header_->GetPredecessors()[0]; DCHECK(irreducible_ || (block == header_->GetDominator())); |