From bd78567cef305e35481734b7fc24f68ded031439 Mon Sep 17 00:00:00 2001 From: Vladimir Marko Date: Thu, 3 May 2018 17:09:09 +0100 Subject: Store HIR type in HInstruction::packed_field_. This is similar to https://android-review.googlesource.com/609566 though the performance impact has not been measured. However, avoiding a virtual call reduces pressure on the branch predictor and provides better optimization opportunities for the C++ compiler. As there is now no difference between HTemplateInstruction<> and HExpression<> (the type is stored in HInstruction), we remove the former and use HExpression<> for all instructions that have a fixed number of inputs. Test: Rely on TreeHugger. Change-Id: Ib3fd111048b0ac38ee65386a7e5af70c5ccc98de --- compiler/optimizing/nodes_mips.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'compiler/optimizing/nodes_mips.h') diff --git a/compiler/optimizing/nodes_mips.h b/compiler/optimizing/nodes_mips.h index d0e0fef946..05b27a7810 100644 --- a/compiler/optimizing/nodes_mips.h +++ b/compiler/optimizing/nodes_mips.h @@ -39,14 +39,14 @@ class HMipsComputeBaseMethodAddress : public HExpression<0> { }; // Mips version of HPackedSwitch that holds a pointer to the base method address. -class HMipsPackedSwitch FINAL : public HTemplateInstruction<2> { +class HMipsPackedSwitch FINAL : public HExpression<2> { public: HMipsPackedSwitch(int32_t start_value, int32_t num_entries, HInstruction* input, HMipsComputeBaseMethodAddress* method_base, uint32_t dex_pc) - : HTemplateInstruction(kMipsPackedSwitch, SideEffects::None(), dex_pc), + : HExpression(kMipsPackedSwitch, SideEffects::None(), dex_pc), start_value_(start_value), num_entries_(num_entries) { SetRawInputAt(0, input); -- cgit v1.2.3-59-g8ed1b