diff options
author | 2015-09-02 14:54:11 -0700 | |
---|---|---|
committer | 2015-09-03 13:27:19 -0700 | |
commit | 736b560f2d2c89b63dc895888c671b5519afa4c8 (patch) | |
tree | d5aee7ac36f458a5f6e6d75fceb19f8963a71db5 /compiler/optimizing/licm_test.cc | |
parent | fe3879e6011f629d0dd6b04fab00b9496bd4ea08 (diff) |
Reduce how often we call FindDexCache
Before host boot.oat -j4 optimizing compile:
real 1m17.792s
user 3m26.140s
sys 0m8.340s
After:
real 1m12.324s
user 3m22.718s
sys 0m8.320s
Change-Id: If18e9e79e06cdf1676692e5efacb682bf93889c3
Diffstat (limited to 'compiler/optimizing/licm_test.cc')
-rw-r--r-- | compiler/optimizing/licm_test.cc | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/compiler/optimizing/licm_test.cc b/compiler/optimizing/licm_test.cc index 2fc66e6de4..bc4a663b86 100644 --- a/compiler/optimizing/licm_test.cc +++ b/compiler/optimizing/licm_test.cc @@ -120,13 +120,14 @@ TEST_F(LICMTest, FieldHoisting) { BuildLoop(); // Populate the loop with instructions: set/get field with different types. + NullHandle<mirror::DexCache> dex_cache; HInstruction* get_field = new (&allocator_) HInstanceFieldGet( parameter_, Primitive::kPrimLong, MemberOffset(10), - false, kUnknownFieldIndex, graph_->GetDexFile()); + false, kUnknownFieldIndex, graph_->GetDexFile(), dex_cache); loop_body_->InsertInstructionBefore(get_field, loop_body_->GetLastInstruction()); HInstruction* set_field = new (&allocator_) HInstanceFieldSet( parameter_, constant_, Primitive::kPrimInt, MemberOffset(20), - false, kUnknownFieldIndex, graph_->GetDexFile()); + false, kUnknownFieldIndex, graph_->GetDexFile(), dex_cache); loop_body_->InsertInstructionBefore(set_field, loop_body_->GetLastInstruction()); EXPECT_EQ(get_field->GetBlock(), loop_body_); @@ -140,13 +141,14 @@ TEST_F(LICMTest, NoFieldHoisting) { BuildLoop(); // Populate the loop with instructions: set/get field with same types. + NullHandle<mirror::DexCache> dex_cache; HInstruction* get_field = new (&allocator_) HInstanceFieldGet( parameter_, Primitive::kPrimLong, MemberOffset(10), - false, kUnknownFieldIndex, graph_->GetDexFile()); + false, kUnknownFieldIndex, graph_->GetDexFile(), dex_cache); loop_body_->InsertInstructionBefore(get_field, loop_body_->GetLastInstruction()); HInstruction* set_field = new (&allocator_) HInstanceFieldSet( parameter_, get_field, Primitive::kPrimLong, MemberOffset(10), - false, kUnknownFieldIndex, graph_->GetDexFile()); + false, kUnknownFieldIndex, graph_->GetDexFile(), dex_cache); loop_body_->InsertInstructionBefore(set_field, loop_body_->GetLastInstruction()); EXPECT_EQ(get_field->GetBlock(), loop_body_); |