summaryrefslogtreecommitdiff
path: root/compiler/optimizing/nodes.cc
diff options
context:
space:
mode:
author Mingyao Yang <mingyao@google.com> 2015-12-09 20:43:06 +0000
committer android-build-merger <android-build-merger@google.com> 2015-12-09 20:43:06 +0000
commit6ca9f51e2c0f730cc2fb43720f159deb572eb388 (patch)
treebad5813c2abd5c3a9c302767290f9b1b9360b707 /compiler/optimizing/nodes.cc
parent3dafd53ff90fc845c09b7206600ba9ff45e3fcbd (diff)
parentf1975e432859101bf8e7b0fd33f6052cafb0f9b2 (diff)
Merge "Simplify and rename IsLoopInvariant() test."
am: f1975e4328 * commit 'f1975e432859101bf8e7b0fd33f6052cafb0f9b2': Simplify and rename IsLoopInvariant() test.
Diffstat (limited to 'compiler/optimizing/nodes.cc')
-rw-r--r--compiler/optimizing/nodes.cc11
1 files changed, 2 insertions, 9 deletions
diff --git a/compiler/optimizing/nodes.cc b/compiler/optimizing/nodes.cc
index 9b26de44fe..461be25887 100644
--- a/compiler/optimizing/nodes.cc
+++ b/compiler/optimizing/nodes.cc
@@ -587,15 +587,8 @@ bool HLoopInformation::IsIn(const HLoopInformation& other) const {
return other.blocks_.IsBitSet(header_->GetBlockId());
}
-bool HLoopInformation::IsLoopInvariant(HInstruction* instruction, bool must_dominate) const {
- HLoopInformation* other_loop = instruction->GetBlock()->GetLoopInformation();
- if (other_loop != this && (other_loop == nullptr || !other_loop->IsIn(*this))) {
- if (must_dominate) {
- return instruction->GetBlock()->Dominates(GetHeader());
- }
- return true;
- }
- return false;
+bool HLoopInformation::IsDefinedOutOfTheLoop(HInstruction* instruction) const {
+ return !blocks_.IsBitSet(instruction->GetBlock()->GetBlockId());
}
size_t HLoopInformation::GetLifetimeEnd() const {