From 736b560f2d2c89b63dc895888c671b5519afa4c8 Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Wed, 2 Sep 2015 14:54:11 -0700 Subject: 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 --- compiler/optimizing/builder.cc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'compiler/optimizing/builder.cc') diff --git a/compiler/optimizing/builder.cc b/compiler/optimizing/builder.cc index 23ab94e5fe..1650fd1ced 100644 --- a/compiler/optimizing/builder.cc +++ b/compiler/optimizing/builder.cc @@ -1205,7 +1205,8 @@ bool HGraphBuilder::BuildInstanceFieldAccess(const Instruction& instruction, resolved_field->GetOffset(), resolved_field->IsVolatile(), field_index, - *dex_file_)); + *dex_file_, + dex_compilation_unit_->GetDexCache())); } else { current_block_->AddInstruction(new (arena_) HInstanceFieldGet( current_block_->GetLastInstruction(), @@ -1213,7 +1214,8 @@ bool HGraphBuilder::BuildInstanceFieldAccess(const Instruction& instruction, resolved_field->GetOffset(), resolved_field->IsVolatile(), field_index, - *dex_file_)); + *dex_file_, + dex_compilation_unit_->GetDexCache())); UpdateLocal(source_or_dest_reg, current_block_->GetLastInstruction()); } @@ -1334,14 +1336,16 @@ bool HGraphBuilder::BuildStaticFieldAccess(const Instruction& instruction, resolved_field->GetOffset(), resolved_field->IsVolatile(), field_index, - *dex_file_)); + *dex_file_, + dex_cache_)); } else { current_block_->AddInstruction(new (arena_) HStaticFieldGet(cls, field_type, resolved_field->GetOffset(), resolved_field->IsVolatile(), field_index, - *dex_file_)); + *dex_file_, + dex_cache_)); UpdateLocal(source_or_dest_reg, current_block_->GetLastInstruction()); } return true; -- cgit v1.2.3-59-g8ed1b