summaryrefslogtreecommitdiff
path: root/compiler/optimizing/code_generator_utils.cc
diff options
context:
space:
mode:
authorDavid Brazdil <dbrazdil@google.com>2016-01-26 11:28:37 +0000
committerDavid Brazdil <dbrazdil@google.com>2016-01-28 15:48:00 +0000
commitb3e773eea39a156b3eacf915ba84e3af1a5c14fa (patch)
tree6c0d3a748d7b445a0d776ed306c7add43a0e1dd3 /compiler/optimizing/code_generator_utils.cc
parent05aeb408f292d8d94af1646a94bc69faf77f0b46 (diff)
ART: Implement support for instruction inlining
Optimizing HIR contains 'non-materialized' instructions which are emitted at their use sites rather than their defining sites. This was not properly handled by the liveness analysis which did not adjust the use positions of the inputs of such instructions. Despite the analysis being incorrect, the current use cases never produce incorrect code. This patch generalizes the concept of inlined instructions and updates liveness analysis to set the compute use positions correctly. Change-Id: Id703c154b20ab861241ae5c715a150385d3ff621
Diffstat (limited to 'compiler/optimizing/code_generator_utils.cc')
-rw-r--r--compiler/optimizing/code_generator_utils.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/optimizing/code_generator_utils.cc b/compiler/optimizing/code_generator_utils.cc
index 644a3fb75e..96fe2a17e6 100644
--- a/compiler/optimizing/code_generator_utils.cc
+++ b/compiler/optimizing/code_generator_utils.cc
@@ -96,7 +96,7 @@ void CalculateMagicAndShiftForDivRem(int64_t divisor, bool is_long,
}
bool IsBooleanValueOrMaterializedCondition(HInstruction* cond_input) {
- return !cond_input->IsCondition() || cond_input->AsCondition()->NeedsMaterialization();
+ return !cond_input->IsCondition() || !cond_input->IsEmittedAtUseSite();
}
} // namespace art