summaryrefslogtreecommitdiff
path: root/compiler/dex/quick/codegen_util.cc
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2013-09-03 18:12:50 -0700
committer Android Git Automerger <android-git-automerger@android.com> 2013-09-03 18:12:50 -0700
commitd1946a2621553968599ca4db0f4200877c30186f (patch)
tree198632072e1d0c3517483cd0b8cfb6fa5502cde6 /compiler/dex/quick/codegen_util.cc
parentbae840aeb33f42c90998a7b97b7c9a07c8f6216c (diff)
parent22955837e20f126845ff0e516dfa6f74ec81d240 (diff)
am 22955837: Merge "Multi threaded hashed deduplication during compilation." into klp-dev
* commit '22955837e20f126845ff0e516dfa6f74ec81d240': Multi threaded hashed deduplication during compilation.
Diffstat (limited to 'compiler/dex/quick/codegen_util.cc')
-rw-r--r--compiler/dex/quick/codegen_util.cc13
1 files changed, 6 insertions, 7 deletions
diff --git a/compiler/dex/quick/codegen_util.cc b/compiler/dex/quick/codegen_util.cc
index d89f1ed227..e081c16bb5 100644
--- a/compiler/dex/quick/codegen_util.cc
+++ b/compiler/dex/quick/codegen_util.cc
@@ -1004,7 +1004,7 @@ CompiledMethod* Mir2Lir::GetCompiledMethod() {
std::vector<uint16_t> raw_vmap_table;
// Core regs may have been inserted out of order - sort first
std::sort(core_vmap_table_.begin(), core_vmap_table_.end());
- for (size_t i = 0 ; i < core_vmap_table_.size(); i++) {
+ for (size_t i = 0 ; i < core_vmap_table_.size(); ++i) {
// Copy, stripping out the phys register sort key
raw_vmap_table.push_back(~(-1 << VREG_NUM_WIDTH) & core_vmap_table_[i]);
}
@@ -1022,14 +1022,13 @@ CompiledMethod* Mir2Lir::GetCompiledMethod() {
UnsignedLeb128EncodingVector vmap_encoder;
// Prefix the encoded data with its size.
vmap_encoder.PushBack(raw_vmap_table.size());
- typedef std::vector<uint16_t>::const_iterator It;
- for (It cur = raw_vmap_table.begin(), end = raw_vmap_table.end(); cur != end; ++cur) {
- vmap_encoder.PushBack(*cur);
+ for (uint16_t cur : raw_vmap_table) {
+ vmap_encoder.PushBack(cur);
}
CompiledMethod* result =
- new CompiledMethod(cu_->instruction_set, code_buffer_,
- frame_size_, core_spill_mask_, fp_spill_mask_,
- encoded_mapping_table_.GetData(), vmap_encoder.GetData(), native_gc_map_);
+ new CompiledMethod(*cu_->compiler_driver, cu_->instruction_set, code_buffer_, frame_size_,
+ core_spill_mask_, fp_spill_mask_, encoded_mapping_table_.GetData(),
+ vmap_encoder.GetData(), native_gc_map_);
return result;
}