summaryrefslogtreecommitdiff
path: root/compiler/optimizing/nodes_x86.h
diff options
context:
space:
mode:
author David Brazdil <dbrazdil@google.com> 2016-01-26 11:28:37 +0000
committer David Brazdil <dbrazdil@google.com> 2016-01-28 15:48:00 +0000
commitb3e773eea39a156b3eacf915ba84e3af1a5c14fa (patch)
tree6c0d3a748d7b445a0d776ed306c7add43a0e1dd3 /compiler/optimizing/nodes_x86.h
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/nodes_x86.h')
-rw-r--r--compiler/optimizing/nodes_x86.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/compiler/optimizing/nodes_x86.h b/compiler/optimizing/nodes_x86.h
index 556217bf74..b1bf939b36 100644
--- a/compiler/optimizing/nodes_x86.h
+++ b/compiler/optimizing/nodes_x86.h
@@ -36,16 +36,12 @@ class HX86ComputeBaseMethodAddress : public HExpression<0> {
class HX86LoadFromConstantTable : public HExpression<2> {
public:
HX86LoadFromConstantTable(HX86ComputeBaseMethodAddress* method_base,
- HConstant* constant,
- bool needs_materialization = true)
- : HExpression(constant->GetType(), SideEffects::None(), kNoDexPc),
- needs_materialization_(needs_materialization) {
+ HConstant* constant)
+ : HExpression(constant->GetType(), SideEffects::None(), kNoDexPc) {
SetRawInputAt(0, method_base);
SetRawInputAt(1, constant);
}
- bool NeedsMaterialization() const { return needs_materialization_; }
-
HX86ComputeBaseMethodAddress* GetBaseMethodAddress() const {
return InputAt(0)->AsX86ComputeBaseMethodAddress();
}
@@ -57,8 +53,6 @@ class HX86LoadFromConstantTable : public HExpression<2> {
DECLARE_INSTRUCTION(X86LoadFromConstantTable);
private:
- const bool needs_materialization_;
-
DISALLOW_COPY_AND_ASSIGN(HX86LoadFromConstantTable);
};