summaryrefslogtreecommitdiff
path: root/compiler/dex/quick/codegen_util.cc
diff options
context:
space:
mode:
author Mathieu Chartier <mathieuc@google.com> 2013-09-04 01:03:04 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2013-09-04 01:03:05 +0000
commit22955837e20f126845ff0e516dfa6f74ec81d240 (patch)
tree884c9c87abca2989170d516f0099b710330ba5ea /compiler/dex/quick/codegen_util.cc
parent68708f536d11f8824d881b640f3902093075c0a6 (diff)
parent193bad9b9cfd10642043fa2ebbfc68bd5f9ede4b (diff)
Merge "Multi threaded hashed deduplication during compilation." into klp-dev
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;
}