From 3ecfd65143d95bd7c6cbe4f58c33af517d3761e0 Mon Sep 17 00:00:00 2001 From: Yevgeny Rouban Date: Mon, 7 Sep 2015 17:57:00 +0600 Subject: Add dex_pc to all HInstructions in builder. Optimizing compiler generates minimum debug line info that is built using the dex_pc information about suspend points. This is not enough for performance and debugging needs. This patch makes all HInstructions contain dex_pc and all allocations in the builder define this value. Change-Id: I1d14aefe075189b7b1b41b4384c3499474c19afc Signed-off-by: Yevgeny Rouban Signed-off-by: Serdjuk, Nikolay Y --- compiler/optimizing/builder.h | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'compiler/optimizing/builder.h') diff --git a/compiler/optimizing/builder.h b/compiler/optimizing/builder.h index 560ed86e50..b0238dc5f8 100644 --- a/compiler/optimizing/builder.h +++ b/compiler/optimizing/builder.h @@ -131,43 +131,37 @@ class HGraphBuilder : public ValueObject { void InitializeLocals(uint16_t count); HLocal* GetLocalAt(int register_index) const; - void UpdateLocal(int register_index, HInstruction* instruction) const; - HInstruction* LoadLocal(int register_index, Primitive::Type type) const; + void UpdateLocal(int register_index, HInstruction* instruction, uint32_t dex_pc) const; + HInstruction* LoadLocal(int register_index, Primitive::Type type, uint32_t dex_pc) const; void PotentiallyAddSuspendCheck(HBasicBlock* target, uint32_t dex_pc); void InitializeParameters(uint16_t number_of_parameters); bool NeedsAccessCheck(uint32_t type_index) const; template - void Unop_12x(const Instruction& instruction, Primitive::Type type); - - template - void Binop_23x(const Instruction& instruction, Primitive::Type type); + void Unop_12x(const Instruction& instruction, Primitive::Type type, uint32_t dex_pc); template void Binop_23x(const Instruction& instruction, Primitive::Type type, uint32_t dex_pc); template - void Binop_23x_shift(const Instruction& instruction, Primitive::Type type); + void Binop_23x_shift(const Instruction& instruction, Primitive::Type type, uint32_t dex_pc); void Binop_23x_cmp(const Instruction& instruction, Primitive::Type type, ComparisonBias bias, uint32_t dex_pc); - template - void Binop_12x(const Instruction& instruction, Primitive::Type type); - template void Binop_12x(const Instruction& instruction, Primitive::Type type, uint32_t dex_pc); template - void Binop_12x_shift(const Instruction& instruction, Primitive::Type type); + void Binop_12x_shift(const Instruction& instruction, Primitive::Type type, uint32_t dex_pc); template - void Binop_22b(const Instruction& instruction, bool reverse); + void Binop_22b(const Instruction& instruction, bool reverse, uint32_t dex_pc); template - void Binop_22s(const Instruction& instruction, bool reverse); + void Binop_22s(const Instruction& instruction, bool reverse, uint32_t dex_pc); template void If_21t(const Instruction& instruction, uint32_t dex_pc); template void If_22t(const Instruction& instruction, uint32_t dex_pc); @@ -185,7 +179,7 @@ class HGraphBuilder : public ValueObject { bool second_is_lit, bool is_div); - void BuildReturn(const Instruction& instruction, Primitive::Type type); + void BuildReturn(const Instruction& instruction, Primitive::Type type, uint32_t dex_pc); // Builds an instance field access node and returns whether the instruction is supported. bool BuildInstanceFieldAccess(const Instruction& instruction, uint32_t dex_pc, bool is_put); -- cgit v1.2.3-59-g8ed1b