diff options
author | Nicolas Geoffray <ngeoffray@google.com> | 2015-06-24 12:20:24 +0100 |
---|---|---|
committer | Nicolas Geoffray <ngeoffray@google.com> | 2015-06-24 16:33:23 +0100 |
commit | 18b236e5261d2b1f312e632a4d3bb2273c8bf641 (patch) | |
tree | 1f4b070a76ec80935a470a1245dd37c35b71ece2 /compiler/optimizing/nodes.h | |
parent | 574cce14025e153d87ec051926d331c5a39e5f92 (diff) | |
download | art-18b236e5261d2b1f312e632a4d3bb2273c8bf641.tar.gz art-18b236e5261d2b1f312e632a4d3bb2273c8bf641.tar.bz2 art-18b236e5261d2b1f312e632a4d3bb2273c8bf641.zip |
Recompute dominator tree after DCE.
bug:22031382
(cherry picked from commit 1f82ecc6a0c9f88d03d6d1a6d95eeb8707bd06c1)
Change-Id: I9a74edb185cb806045903dfe9695d9cc1a02e86b
Diffstat (limited to 'compiler/optimizing/nodes.h')
-rw-r--r-- | compiler/optimizing/nodes.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h index 394e3fcabc..b36d9b8d2d 100644 --- a/compiler/optimizing/nodes.h +++ b/compiler/optimizing/nodes.h @@ -170,6 +170,9 @@ class HGraph : public ArenaObject<kArenaAllocMisc> { return true; } + void ComputeDominanceInformation(); + void ClearDominanceInformation(); + void BuildDominatorTree(); void TransformToSsa(); void SimplifyCFG(); @@ -547,11 +550,10 @@ class HBasicBlock : public ArenaObject<kArenaAllocMisc> { LOG(FATAL) << "Unreachable"; UNREACHABLE(); } + void ClearDominanceInformation(); int NumberOfBackEdges() const { - return loop_information_ == nullptr - ? 0 - : loop_information_->NumberOfBackEdges(); + return IsLoopHeader() ? loop_information_->NumberOfBackEdges() : 0; } HInstruction* GetFirstInstruction() const { return instructions_.first_instruction_; } |