summaryrefslogtreecommitdiff
path: root/compiler/dex/mir_analysis.cc
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2015-09-02 14:54:11 -0700
committer Mathieu Chartier <mathieuc@google.com> 2015-09-03 13:27:19 -0700
commit736b560f2d2c89b63dc895888c671b5519afa4c8 (patch)
treed5aee7ac36f458a5f6e6d75fceb19f8963a71db5 /compiler/dex/mir_analysis.cc
parentfe3879e6011f629d0dd6b04fab00b9496bd4ea08 (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/dex/mir_analysis.cc')
-rw-r--r--compiler/dex/mir_analysis.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/compiler/dex/mir_analysis.cc b/compiler/dex/mir_analysis.cc
index 1cff8dc50c..39f8ee8f7e 100644
--- a/compiler/dex/mir_analysis.cc
+++ b/compiler/dex/mir_analysis.cc
@@ -30,6 +30,7 @@
#include "driver/compiler_driver.h"
#include "driver/compiler_options.h"
#include "driver/dex_compilation_unit.h"
+#include "scoped_thread_state_change.h"
#include "utils.h"
namespace art {
@@ -1283,8 +1284,12 @@ void MIRGraph::DoCacheFieldLoweringInfo() {
ifield_lowering_infos_.push_back(
MirIFieldLoweringInfo(masked_field_idx, field_types[pos], is_quickened));
}
- MirIFieldLoweringInfo::Resolve(cu_->compiler_driver, GetCurrentDexCompilationUnit(),
- ifield_lowering_infos_.data(), ifield_pos);
+ ScopedObjectAccess soa(Thread::Current());
+ MirIFieldLoweringInfo::Resolve(soa,
+ cu_->compiler_driver,
+ GetCurrentDexCompilationUnit(),
+ ifield_lowering_infos_.data(),
+ ifield_pos);
}
if (sfield_pos != max_refs) {