From 7940e44f4517de5e2634a7e07d58d0fb26160513 Mon Sep 17 00:00:00 2001 From: Brian Carlstrom Date: Fri, 12 Jul 2013 13:46:57 -0700 Subject: Create separate Android.mk for main build targets The runtime, compiler, dex2oat, and oatdump now are in seperate trees to prevent dependency creep. They can now be individually built without rebuilding the rest of the art projects. dalvikvm and jdwpspy were already this way. Builds in the art directory should behave as before, building everything including tests. Change-Id: Ic6b1151e5ed0f823c3dd301afd2b13eb2d8feb81 --- compiler/llvm/md_builder.cc | 101 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 101 insertions(+) create mode 100644 compiler/llvm/md_builder.cc (limited to 'compiler/llvm/md_builder.cc') diff --git a/compiler/llvm/md_builder.cc b/compiler/llvm/md_builder.cc new file mode 100644 index 0000000000..3884f51056 --- /dev/null +++ b/compiler/llvm/md_builder.cc @@ -0,0 +1,101 @@ +/* + * Copyright (C) 2012 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +#include "md_builder.h" + +#include "llvm/IR/MDBuilder.h" + +#include + +namespace art { +namespace llvm { + + +::llvm::MDNode* MDBuilder::GetTBAASpecialType(TBAASpecialType sty_id) { + DCHECK_GE(sty_id, 0) << "Unknown TBAA special type: " << sty_id; + DCHECK_LT(sty_id, MAX_TBAA_SPECIAL_TYPE) << "Unknown TBAA special type: " << sty_id; + DCHECK(tbaa_root_ != NULL); + + ::llvm::MDNode*& spec_ty = tbaa_special_type_[sty_id]; + if (spec_ty == NULL) { + switch (sty_id) { + case kTBAARegister: spec_ty = createTBAANode("Register", tbaa_root_); break; + case kTBAAStackTemp: spec_ty = createTBAANode("StackTemp", tbaa_root_); break; + case kTBAAHeapArray: spec_ty = createTBAANode("HeapArray", tbaa_root_); break; + case kTBAAHeapInstance: spec_ty = createTBAANode("HeapInstance", tbaa_root_); break; + case kTBAAHeapStatic: spec_ty = createTBAANode("HeapStatic", tbaa_root_); break; + case kTBAAJRuntime: spec_ty = createTBAANode("JRuntime", tbaa_root_); break; + case kTBAARuntimeInfo: spec_ty = createTBAANode("RuntimeInfo", + GetTBAASpecialType(kTBAAJRuntime)); break; + case kTBAAShadowFrame: spec_ty = createTBAANode("ShadowFrame", + GetTBAASpecialType(kTBAAJRuntime)); break; + case kTBAAConstJObject: spec_ty = createTBAANode("ConstJObject", tbaa_root_, true); break; + default: + LOG(FATAL) << "Unknown TBAA special type: " << sty_id; + break; + } + } + return spec_ty; +} + +::llvm::MDNode* MDBuilder::GetTBAAMemoryJType(TBAASpecialType sty_id, JType jty_id) { + DCHECK(sty_id == kTBAAHeapArray || + sty_id == kTBAAHeapInstance || + sty_id == kTBAAHeapStatic) << "SpecialType must be array, instance, or static"; + + DCHECK_GE(jty_id, 0) << "Unknown JType: " << jty_id; + DCHECK_LT(jty_id, MAX_JTYPE) << "Unknown JType: " << jty_id; + DCHECK_NE(jty_id, kVoid) << "Can't load/store Void type!"; + + std::string name; + size_t sty_mapped_index = 0; + switch (sty_id) { + case kTBAAHeapArray: sty_mapped_index = 0; name = "HeapArray "; break; + case kTBAAHeapInstance: sty_mapped_index = 1; name = "HeapInstance "; break; + case kTBAAHeapStatic: sty_mapped_index = 2; name = "HeapStatic "; break; + default: + LOG(FATAL) << "Unknown TBAA special type: " << sty_id; + break; + } + + ::llvm::MDNode*& spec_ty = tbaa_memory_jtype_[sty_mapped_index][jty_id]; + if (spec_ty != NULL) { + return spec_ty; + } + + switch (jty_id) { + case kBoolean: name += "Boolean"; break; + case kByte: name += "Byte"; break; + case kChar: name += "Char"; break; + case kShort: name += "Short"; break; + case kInt: name += "Int"; break; + case kLong: name += "Long"; break; + case kFloat: name += "Float"; break; + case kDouble: name += "Double"; break; + case kObject: name += "Object"; break; + default: + LOG(FATAL) << "Unknown JType: " << jty_id; + break; + } + + spec_ty = createTBAANode(name, GetTBAASpecialType(sty_id)); + return spec_ty; +} + + +} // namespace llvm +} // namespace art -- cgit v1.2.3-59-g8ed1b From f69863b3039fc621ff4250e262d2a024d5e79ec8 Mon Sep 17 00:00:00 2001 From: Brian Carlstrom Date: Wed, 17 Jul 2013 21:53:13 -0700 Subject: Fix cpplint whitespace/newline issues Change-Id: Ie2049d9f667339e41f36c4f5d09f0d10d8d2c762 --- Android.mk | 2 +- compiler/dex/frontend.cc | 9 +++++--- compiler/dex/quick/codegen_util.cc | 2 +- compiler/dex/quick/mips/utility_mips.cc | 15 +++++-------- compiler/llvm/md_builder.cc | 38 +++++++++++++++++++++++---------- runtime/base/logging.cc | 28 ++++++++++++++++++------ runtime/debugger.h | 2 +- runtime/gc/heap.cc | 2 +- runtime/runtime_support.h | 8 +++++-- runtime/thread.cc | 6 +++++- 10 files changed, 74 insertions(+), 38 deletions(-) (limited to 'compiler/llvm/md_builder.cc') diff --git a/Android.mk b/Android.mk index ebebc61170..27bd894f13 100644 --- a/Android.mk +++ b/Android.mk @@ -334,7 +334,7 @@ endif .PHONY: cpplint-art cpplint-art: ./art/tools/cpplint.py \ - --filter=-,+build/header_guard,+whitespace/braces,+whitespace/comma,+runtime/explicit \ + --filter=-,+build/header_guard,+whitespace/braces,+whitespace/comma,+runtime/explicit,+whitespace/newline \ $(shell find art -name *.h -o -name *$(ART_CPP_EXTENSION)) # "mm cpplint-art-aspirational" to see warnings we would like to fix diff --git a/compiler/dex/frontend.cc b/compiler/dex/frontend.cc index 2d7c973859..08039147a0 100644 --- a/compiler/dex/frontend.cc +++ b/compiler/dex/frontend.cc @@ -223,11 +223,14 @@ static CompiledMethod* CompileMethod(CompilerDriver& compiler, { // NOLINT(whitespace/braces) switch (compiler.GetInstructionSet()) { case kThumb2: - cu->cg.reset(ArmCodeGenerator(cu.get(), cu->mir_graph.get(), &cu->arena)); break; + cu->cg.reset(ArmCodeGenerator(cu.get(), cu->mir_graph.get(), &cu->arena)); + break; case kMips: - cu->cg.reset(MipsCodeGenerator(cu.get(), cu->mir_graph.get(), &cu->arena)); break; + cu->cg.reset(MipsCodeGenerator(cu.get(), cu->mir_graph.get(), &cu->arena)); + break; case kX86: - cu->cg.reset(X86CodeGenerator(cu.get(), cu->mir_graph.get(), &cu->arena)); break; + cu->cg.reset(X86CodeGenerator(cu.get(), cu->mir_graph.get(), &cu->arena)); + break; default: LOG(FATAL) << "Unexpected instruction set: " << compiler.GetInstructionSet(); } diff --git a/compiler/dex/quick/codegen_util.cc b/compiler/dex/quick/codegen_util.cc index e728d2769b..e169dc8f54 100644 --- a/compiler/dex/quick/codegen_util.cc +++ b/compiler/dex/quick/codegen_util.cc @@ -61,7 +61,7 @@ void Mir2Lir::NopLIR( LIR* lir) { void Mir2Lir::SetMemRefType(LIR* lir, bool is_load, int mem_type) { uint64_t *mask_ptr; - uint64_t mask = ENCODE_MEM;; + uint64_t mask = ENCODE_MEM; DCHECK(GetTargetInstFlags(lir->opcode) & (IS_LOAD | IS_STORE)); if (is_load) { mask_ptr = &lir->use_mask; diff --git a/compiler/dex/quick/mips/utility_mips.cc b/compiler/dex/quick/mips/utility_mips.cc index 1975d1a4c1..8510006051 100644 --- a/compiler/dex/quick/mips/utility_mips.cc +++ b/compiler/dex/quick/mips/utility_mips.cc @@ -208,8 +208,7 @@ LIR* MipsMir2Lir::OpRegRegImm(OpKind op, int r_dest, int r_src1, int value) { case kOpAdd: if (IS_SIMM16(value)) { opcode = kMipsAddiu; - } - else { + } else { short_form = false; opcode = kMipsAddu; } @@ -218,8 +217,7 @@ LIR* MipsMir2Lir::OpRegRegImm(OpKind op, int r_dest, int r_src1, int value) { if (IS_SIMM16((-value))) { value = -value; opcode = kMipsAddiu; - } - else { + } else { short_form = false; opcode = kMipsSubu; } @@ -239,8 +237,7 @@ LIR* MipsMir2Lir::OpRegRegImm(OpKind op, int r_dest, int r_src1, int value) { case kOpAnd: if (IS_UIMM16((value))) { opcode = kMipsAndi; - } - else { + } else { short_form = false; opcode = kMipsAnd; } @@ -248,8 +245,7 @@ LIR* MipsMir2Lir::OpRegRegImm(OpKind op, int r_dest, int r_src1, int value) { case kOpOr: if (IS_UIMM16((value))) { opcode = kMipsOri; - } - else { + } else { short_form = false; opcode = kMipsOr; } @@ -257,8 +253,7 @@ LIR* MipsMir2Lir::OpRegRegImm(OpKind op, int r_dest, int r_src1, int value) { case kOpXor: if (IS_UIMM16((value))) { opcode = kMipsXori; - } - else { + } else { short_form = false; opcode = kMipsXor; } diff --git a/compiler/llvm/md_builder.cc b/compiler/llvm/md_builder.cc index 3884f51056..1bd76dddba 100644 --- a/compiler/llvm/md_builder.cc +++ b/compiler/llvm/md_builder.cc @@ -33,17 +33,33 @@ namespace llvm { ::llvm::MDNode*& spec_ty = tbaa_special_type_[sty_id]; if (spec_ty == NULL) { switch (sty_id) { - case kTBAARegister: spec_ty = createTBAANode("Register", tbaa_root_); break; - case kTBAAStackTemp: spec_ty = createTBAANode("StackTemp", tbaa_root_); break; - case kTBAAHeapArray: spec_ty = createTBAANode("HeapArray", tbaa_root_); break; - case kTBAAHeapInstance: spec_ty = createTBAANode("HeapInstance", tbaa_root_); break; - case kTBAAHeapStatic: spec_ty = createTBAANode("HeapStatic", tbaa_root_); break; - case kTBAAJRuntime: spec_ty = createTBAANode("JRuntime", tbaa_root_); break; - case kTBAARuntimeInfo: spec_ty = createTBAANode("RuntimeInfo", - GetTBAASpecialType(kTBAAJRuntime)); break; - case kTBAAShadowFrame: spec_ty = createTBAANode("ShadowFrame", - GetTBAASpecialType(kTBAAJRuntime)); break; - case kTBAAConstJObject: spec_ty = createTBAANode("ConstJObject", tbaa_root_, true); break; + case kTBAARegister: + spec_ty = createTBAANode("Register", tbaa_root_); + break; + case kTBAAStackTemp: + spec_ty = createTBAANode("StackTemp", tbaa_root_); + break; + case kTBAAHeapArray: + spec_ty = createTBAANode("HeapArray", tbaa_root_); + break; + case kTBAAHeapInstance: + spec_ty = createTBAANode("HeapInstance", tbaa_root_); + break; + case kTBAAHeapStatic: + spec_ty = createTBAANode("HeapStatic", tbaa_root_); + break; + case kTBAAJRuntime: + spec_ty = createTBAANode("JRuntime", tbaa_root_); + break; + case kTBAARuntimeInfo: + spec_ty = createTBAANode("RuntimeInfo", GetTBAASpecialType(kTBAAJRuntime)); + break; + case kTBAAShadowFrame: + spec_ty = createTBAANode("ShadowFrame", GetTBAASpecialType(kTBAAJRuntime)); + break; + case kTBAAConstJObject: + spec_ty = createTBAANode("ConstJObject", tbaa_root_, true); + break; default: LOG(FATAL) << "Unknown TBAA special type: " << sty_id; break; diff --git a/runtime/base/logging.cc b/runtime/base/logging.cc index 2c6b6a8ce5..bf19e8d734 100644 --- a/runtime/base/logging.cc +++ b/runtime/base/logging.cc @@ -87,14 +87,28 @@ void InitLogging(char* argv[]) { std::string spec(specs[i]); if (spec.size() == 3 && StartsWith(spec, "*:")) { switch (spec[2]) { - case 'v': gMinimumLogSeverity = VERBOSE; continue; - case 'd': gMinimumLogSeverity = DEBUG; continue; - case 'i': gMinimumLogSeverity = INFO; continue; - case 'w': gMinimumLogSeverity = WARNING; continue; - case 'e': gMinimumLogSeverity = ERROR; continue; - case 'f': gMinimumLogSeverity = FATAL; continue; + case 'v': + gMinimumLogSeverity = VERBOSE; + continue; + case 'd': + gMinimumLogSeverity = DEBUG; + continue; + case 'i': + gMinimumLogSeverity = INFO; + continue; + case 'w': + gMinimumLogSeverity = WARNING; + continue; + case 'e': + gMinimumLogSeverity = ERROR; + continue; + case 'f': + gMinimumLogSeverity = FATAL; + continue; // liblog will even suppress FATAL if you say 's' for silent, but that's crazy! - case 's': gMinimumLogSeverity = FATAL; continue; + case 's': + gMinimumLogSeverity = FATAL; + continue; } } LOG(FATAL) << "unsupported '" << spec << "' in ANDROID_LOG_TAGS (" << tags << ")"; diff --git a/runtime/debugger.h b/runtime/debugger.h index 94f3cbed76..28a2c60f8c 100644 --- a/runtime/debugger.h +++ b/runtime/debugger.h @@ -238,7 +238,7 @@ class Dbg { static JDWP::JdwpTag GetFieldBasicTag(JDWP::FieldId field_id) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); static JDWP::JdwpTag GetStaticFieldBasicTag(JDWP::FieldId field_id) - SHARED_LOCKS_REQUIRED(Locks::mutator_lock_);; + SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); static JDWP::JdwpError GetFieldValue(JDWP::ObjectId object_id, JDWP::FieldId field_id, JDWP::ExpandBuf* pReply) SHARED_LOCKS_REQUIRED(Locks::mutator_lock_); diff --git a/runtime/gc/heap.cc b/runtime/gc/heap.cc index 85b7bf01b9..deb1b8c3e5 100644 --- a/runtime/gc/heap.cc +++ b/runtime/gc/heap.cc @@ -1538,7 +1538,7 @@ collector::GcType Heap::WaitForConcurrentGcToComplete(Thread* self) { gc_complete_cond_->Wait(self); } last_gc_type = last_gc_type_; - wait_time = NanoTime() - wait_start;; + wait_time = NanoTime() - wait_start; total_wait_time_ += wait_time; } if (wait_time > kLongGcPauseThreshold) { diff --git a/runtime/runtime_support.h b/runtime/runtime_support.h index 051981f99e..a6c3b38345 100644 --- a/runtime/runtime_support.h +++ b/runtime/runtime_support.h @@ -176,8 +176,12 @@ static inline mirror::Field* FindFieldFast(uint32_t field_idx, case StaticObjectWrite: is_primitive = false; is_set = true; is_static = true; break; case StaticPrimitiveRead: is_primitive = true; is_set = false; is_static = true; break; case StaticPrimitiveWrite: is_primitive = true; is_set = true; is_static = true; break; - default: LOG(FATAL) << "UNREACHABLE"; // Assignment below to avoid GCC warnings. - is_primitive = true; is_set = true; is_static = true; break; + default: + LOG(FATAL) << "UNREACHABLE"; // Assignment below to avoid GCC warnings. + is_primitive = true; + is_set = true; + is_static = true; + break; } if (UNLIKELY(resolved_field->IsStatic() != is_static)) { // Incompatible class change. diff --git a/runtime/thread.cc b/runtime/thread.cc index 6114c63fbe..dd55195c15 100644 --- a/runtime/thread.cc +++ b/runtime/thread.cc @@ -1703,7 +1703,11 @@ static const EntryPointInfo gThreadEntryPointInfo[] = { void Thread::DumpThreadOffset(std::ostream& os, uint32_t offset, size_t size_of_pointers) { CHECK_EQ(size_of_pointers, 4U); // TODO: support 64-bit targets. -#define DO_THREAD_OFFSET(x) if (offset == static_cast(OFFSETOF_VOLATILE_MEMBER(Thread, x))) { os << # x; return; } +#define DO_THREAD_OFFSET(x) \ + if (offset == static_cast(OFFSETOF_VOLATILE_MEMBER(Thread, x))) { \ + os << # x; \ + return; \ + } DO_THREAD_OFFSET(state_and_flags_); DO_THREAD_OFFSET(card_table_); DO_THREAD_OFFSET(exception_); -- cgit v1.2.3-59-g8ed1b From 7934ac288acfb2552bb0b06ec1f61e5820d924a4 Mon Sep 17 00:00:00 2001 From: Brian Carlstrom Date: Fri, 26 Jul 2013 10:54:15 -0700 Subject: Fix cpplint whitespace/comments issues Change-Id: Iae286862c85fb8fd8901eae1204cd6d271d69496 --- build/Android.cpplint.mk | 2 +- compiler/dex/arena_allocator.h | 2 +- compiler/dex/compiler_enums.h | 20 +- compiler/dex/dataflow_iterator.h | 2 +- compiler/dex/dex_to_dex_compiler.cc | 4 +- compiler/dex/frontend.cc | 56 +- compiler/dex/frontend.h | 2 +- compiler/dex/local_value_numbering.h | 2 +- compiler/dex/mir_graph.cc | 12 +- compiler/dex/mir_graph.h | 6 +- compiler/dex/mir_optimization.cc | 2 +- compiler/dex/portable/mir_to_gbc.cc | 6 +- compiler/dex/quick/arm/arm_lir.h | 28 +- compiler/dex/quick/arm/call_arm.cc | 6 +- compiler/dex/quick/arm/fp_arm.cc | 2 +- compiler/dex/quick/arm/int_arm.cc | 16 +- compiler/dex/quick/arm/target_arm.cc | 2 +- compiler/dex/quick/arm/utility_arm.cc | 6 +- compiler/dex/quick/codegen_util.cc | 2 +- compiler/dex/quick/gen_common.cc | 10 +- compiler/dex/quick/gen_invoke.cc | 14 +- compiler/dex/quick/mips/call_mips.cc | 2 +- compiler/dex/quick/mips/fp_mips.cc | 4 +- compiler/dex/quick/mips/int_mips.cc | 6 +- compiler/dex/quick/mips/mips_lir.h | 58 +- compiler/dex/quick/mips/target_mips.cc | 4 +- compiler/dex/quick/mips/utility_mips.cc | 2 +- compiler/dex/quick/mir_to_lir.h | 4 +- compiler/dex/quick/ralloc_util.cc | 10 +- compiler/dex/quick/x86/assemble_x86.cc | 4 +- compiler/dex/quick/x86/call_x86.cc | 2 +- compiler/dex/quick/x86/fp_x86.cc | 2 +- compiler/dex/quick/x86/target_x86.cc | 4 +- compiler/dex/quick/x86/utility_x86.cc | 10 +- compiler/dex/quick/x86/x86_lir.h | 36 +- compiler/dex/ssa_transformation.cc | 8 +- compiler/dex/vreg_analysis.cc | 2 +- compiler/driver/compiler_driver.cc | 808 ++++++++++----------- compiler/driver/dex_compilation_unit.cc | 2 +- compiler/driver/dex_compilation_unit.h | 2 +- compiler/elf_fixup.cc | 32 +- compiler/elf_writer_mclinker.h | 2 +- compiler/elf_writer_quick.cc | 4 +- compiler/image_writer.cc | 6 +- compiler/jni/portable/jni_compiler.cc | 14 +- compiler/llvm/backend_types.h | 4 +- compiler/llvm/compiler_llvm.cc | 8 +- compiler/llvm/compiler_llvm.h | 4 +- compiler/llvm/gbc_expander.cc | 46 +- compiler/llvm/generated/art_module.cc | 132 ++-- compiler/llvm/intrinsic_helper.cc | 4 +- compiler/llvm/intrinsic_helper.h | 4 +- compiler/llvm/ir_builder.cc | 4 +- compiler/llvm/ir_builder.h | 4 +- compiler/llvm/llvm_compilation_unit.cc | 12 +- compiler/llvm/llvm_compilation_unit.h | 6 +- compiler/llvm/md_builder.cc | 4 +- compiler/llvm/md_builder.h | 4 +- compiler/llvm/runtime_support_builder.cc | 4 +- compiler/llvm/runtime_support_builder.h | 4 +- compiler/llvm/runtime_support_builder_arm.cc | 6 +- compiler/llvm/runtime_support_builder_arm.h | 4 +- compiler/llvm/runtime_support_builder_thumb2.cc | 6 +- compiler/llvm/runtime_support_builder_thumb2.h | 4 +- compiler/llvm/runtime_support_builder_x86.cc | 4 +- compiler/llvm/runtime_support_builder_x86.h | 4 +- compiler/llvm/runtime_support_llvm_func.h | 6 +- compiler/sea_ir/code_gen.cc | 4 +- compiler/sea_ir/code_gen.h | 8 +- compiler/sea_ir/frontend.cc | 4 +- compiler/sea_ir/instruction_nodes.h | 6 +- compiler/sea_ir/instruction_tools.cc | 2 +- compiler/sea_ir/instruction_tools.h | 2 +- compiler/sea_ir/sea.cc | 28 +- compiler/sea_ir/sea.h | 4 +- compiler/sea_ir/sea_node.h | 2 +- compiler/sea_ir/visitor.h | 4 +- compiler/stubs/portable/stubs.cc | 14 +- compiler/stubs/quick/stubs.cc | 12 +- compiler/utils/scoped_hashtable.h | 2 +- compiler/utils/scoped_hashtable_test.cc | 2 +- dalvikvm/dalvikvm.cc | 2 +- dex2oat/dex2oat.cc | 6 +- jdwpspy/Net.cpp | 2 +- oatdump/oatdump.cc | 2 +- runtime/base/histogram_test.cc | 28 +- runtime/base/logging.cc | 2 +- runtime/base/logging.h | 4 +- runtime/base/macros.h | 2 +- runtime/base/mutex-inl.h | 2 +- runtime/base/mutex.cc | 10 +- runtime/base/unix_file/mapped_file_test.cc | 2 +- runtime/check_jni.cc | 56 +- runtime/class_linker.cc | 6 +- runtime/class_linker.h | 4 +- runtime/common_test.h | 8 +- runtime/compiled_method.cc | 2 +- runtime/debugger.cc | 44 +- runtime/debugger.h | 2 +- runtime/dex_file.cc | 2 +- runtime/dex_file.h | 2 +- runtime/dex_file_verifier.cc | 2 +- runtime/dex_instruction-inl.h | 8 +- runtime/dex_instruction.cc | 8 +- runtime/dex_instruction.h | 4 +- runtime/dex_instruction_list.h | 2 +- runtime/disassembler_arm.cc | 52 +- runtime/disassembler_mips.cc | 42 +- runtime/disassembler_x86.cc | 2 +- runtime/exception_test.cc | 2 +- runtime/gc/accounting/card_table.cc | 2 +- runtime/gc/accounting/space_bitmap-inl.h | 2 +- runtime/gc/collector/mark_sweep.cc | 4 +- runtime/gc/collector/mark_sweep.h | 2 +- runtime/gc/heap.cc | 2 +- runtime/gc/space/dlmalloc_space.cc | 4 +- runtime/gc/space/space.h | 2 +- runtime/hprof/hprof.cc | 18 +- runtime/indirect_reference_table.cc | 2 +- runtime/indirect_reference_table.h | 8 +- runtime/instrumentation.cc | 14 +- runtime/intern_table.cc | 8 +- runtime/intern_table_test.cc | 2 +- runtime/interpreter/interpreter.cc | 6 +- runtime/invoke_type.h | 10 +- runtime/jdwp/jdwp.h | 8 +- runtime/jdwp/jdwp_constants.h | 8 +- runtime/jdwp/jdwp_event.cc | 6 +- runtime/jdwp/jdwp_handler.cc | 6 +- runtime/jdwp/jdwp_priv.h | 4 +- runtime/jdwp/jdwp_request.cc | 2 +- runtime/jdwp/object_registry.cc | 6 +- runtime/jni_internal.cc | 26 +- runtime/jvalue.h | 4 +- runtime/locks.h | 2 +- runtime/log_severity.h | 2 +- runtime/mem_map.cc | 6 +- runtime/mirror/dex_cache.h | 2 +- runtime/mirror/field.cc | 2 +- runtime/mirror/throwable.h | 2 +- runtime/monitor.cc | 6 +- runtime/native/dalvik_system_VMDebug.cc | 4 +- runtime/native/dalvik_system_Zygote.cc | 2 +- runtime/native/java_lang_Thread.cc | 2 +- runtime/oat/runtime/arm/context_arm.cc | 2 +- runtime/oat/runtime/mips/context_mips.cc | 2 +- runtime/oat/runtime/support_interpreter.cc | 2 +- runtime/oat/runtime/support_jni.cc | 2 +- runtime/oat/runtime/support_stubs.cc | 4 +- .../oat/runtime/x86/oat_support_entrypoints_x86.cc | 12 +- runtime/oat_test.cc | 2 +- runtime/reference_table.cc | 2 +- runtime/reference_table.h | 2 +- runtime/reflection.cc | 2 +- runtime/runtime.cc | 32 +- runtime/runtime_linux.cc | 2 +- runtime/runtime_support.cc | 8 +- runtime/runtime_support_llvm_func_list.h | 2 +- runtime/safe_map.h | 2 +- runtime/scoped_thread_state_change.h | 2 +- runtime/signal_catcher.cc | 2 +- runtime/stack.cc | 8 +- runtime/stack.h | 6 +- runtime/thread.cc | 20 +- runtime/thread.h | 6 +- runtime/thread_linux.cc | 2 +- runtime/thread_list.cc | 6 +- runtime/thread_list.h | 4 +- runtime/thread_state.h | 40 +- runtime/trace.cc | 14 +- runtime/utils.cc | 34 +- runtime/verifier/dex_gc_map.h | 6 +- runtime/verifier/method_verifier.cc | 16 +- runtime/verifier/method_verifier.h | 22 +- runtime/verifier/reg_type_cache.cc | 2 +- runtime/verifier/reg_type_test.cc | 2 +- runtime/zip_archive.cc | 2 +- test/ReferenceMap/stack_walk_refmap_jni.cc | 44 +- test/StackWalk/stack_walk_jni.cc | 2 +- 179 files changed, 1208 insertions(+), 1208 deletions(-) (limited to 'compiler/llvm/md_builder.cc') diff --git a/build/Android.cpplint.mk b/build/Android.cpplint.mk index eabaf31cca..adb87cb4e9 100644 --- a/build/Android.cpplint.mk +++ b/build/Android.cpplint.mk @@ -15,7 +15,7 @@ # ART_CPPLINT := art/tools/cpplint.py -ART_CPPLINT_FILTER := --filter=-whitespace/comments,-whitespace/line_length,-build/include,-readability/function,-readability/streams,-readability/todo,-runtime/references,-runtime/sizeof,-runtime/threadsafe_fn,-runtime/printf +ART_CPPLINT_FILTER := --filter=-whitespace/line_length,-build/include,-readability/function,-readability/streams,-readability/todo,-runtime/references,-runtime/sizeof,-runtime/threadsafe_fn,-runtime/printf ART_CPPLINT_SRC := $(shell find art -name *.h -o -name *$(ART_CPP_EXTENSION) | grep -v art/compiler/llvm/generated/) # "mm cpplint-art" to verify we aren't regressing diff --git a/compiler/dex/arena_allocator.h b/compiler/dex/arena_allocator.h index 3bd733e753..e8e2c027d0 100644 --- a/compiler/dex/arena_allocator.h +++ b/compiler/dex/arena_allocator.h @@ -86,7 +86,7 @@ struct MemStats { explicit MemStats(const ArenaAllocator &arena) : arena_(arena) {} private: const ArenaAllocator &arena_; -}; // MemStats +}; // MemStats } // namespace art diff --git a/compiler/dex/compiler_enums.h b/compiler/dex/compiler_enums.h index 88240e8c40..97a682f2aa 100644 --- a/compiler/dex/compiler_enums.h +++ b/compiler/dex/compiler_enums.h @@ -48,7 +48,7 @@ enum SpecialTargetRegister { }; enum RegLocationType { - kLocDalvikFrame = 0, // Normal Dalvik register + kLocDalvikFrame = 0, // Normal Dalvik register kLocPhysReg, kLocCompilerTemp, kLocInvalid @@ -249,20 +249,20 @@ enum X86ConditionCode { kX86CondC = kX86CondB, // carry kX86CondNb = 0x3, // not-below - kX86CondAe = kX86CondNb, // above-equal - kX86CondNc = kX86CondNb, // not-carry + kX86CondAe = kX86CondNb, // above-equal + kX86CondNc = kX86CondNb, // not-carry kX86CondZ = 0x4, // zero kX86CondEq = kX86CondZ, // equal kX86CondNz = 0x5, // not-zero - kX86CondNe = kX86CondNz, // not-equal + kX86CondNe = kX86CondNz, // not-equal kX86CondBe = 0x6, // below-equal - kX86CondNa = kX86CondBe, // not-above + kX86CondNa = kX86CondBe, // not-above kX86CondNbe = 0x7, // not-below-equal - kX86CondA = kX86CondNbe,// above + kX86CondA = kX86CondNbe, // above kX86CondS = 0x8, // sign kX86CondNs = 0x9, // not-sign @@ -277,13 +277,13 @@ enum X86ConditionCode { kX86CondNge = kX86CondL, // not-greater-equal kX86CondNl = 0xd, // not-less-than - kX86CondGe = kX86CondNl, // not-greater-equal + kX86CondGe = kX86CondNl, // not-greater-equal kX86CondLe = 0xe, // less-than-equal - kX86CondNg = kX86CondLe, // not-greater + kX86CondNg = kX86CondLe, // not-greater kX86CondNle = 0xf, // not-less-than - kX86CondG = kX86CondNle,// greater + kX86CondG = kX86CondNle, // greater }; std::ostream& operator<<(std::ostream& os, const X86ConditionCode& kind); @@ -349,7 +349,7 @@ enum OpFeatureFlags { kIsIT, kMemLoad, kMemStore, - kPCRelFixup, // x86 FIXME: add NEEDS_FIXUP to instruction attributes. + kPCRelFixup, // x86 FIXME: add NEEDS_FIXUP to instruction attributes. kRegDef0, kRegDef1, kRegDefA, diff --git a/compiler/dex/dataflow_iterator.h b/compiler/dex/dataflow_iterator.h index 847a614727..da44ffd99c 100644 --- a/compiler/dex/dataflow_iterator.h +++ b/compiler/dex/dataflow_iterator.h @@ -80,7 +80,7 @@ namespace art { GrowableArray* block_id_list_; int idx_; bool changed_; - }; // DataflowIterator + }; // DataflowIterator class ReachableNodesIterator : public DataflowIterator { public: diff --git a/compiler/dex/dex_to_dex_compiler.cc b/compiler/dex/dex_to_dex_compiler.cc index 28c325726e..3c491ce20f 100644 --- a/compiler/dex/dex_to_dex_compiler.cc +++ b/compiler/dex/dex_to_dex_compiler.cc @@ -240,12 +240,12 @@ Instruction* DexCompiler::CompileCheckCast(Instruction* inst, uint32_t dex_pc) { // We are modifying 4 consecutive bytes. ScopedDexWriteAccess sdwa(GetModifiableDexFile(), inst, 4u); inst->SetOpcode(Instruction::NOP); - inst->SetVRegA_10x(0u); // keep compliant with verifier. + inst->SetVRegA_10x(0u); // keep compliant with verifier. // Get to next instruction which is the second half of check-cast and replace // it by a NOP. inst = const_cast(inst->Next()); inst->SetOpcode(Instruction::NOP); - inst->SetVRegA_10x(0u); // keep compliant with verifier. + inst->SetVRegA_10x(0u); // keep compliant with verifier. return inst; } diff --git a/compiler/dex/frontend.cc b/compiler/dex/frontend.cc index 113a80a96c..9cc4d18d37 100644 --- a/compiler/dex/frontend.cc +++ b/compiler/dex/frontend.cc @@ -72,37 +72,37 @@ extern "C" void ArtUnInitQuickCompilerContext(art::CompilerDriver& compiler) { } /* Default optimizer/debug setting for the compiler. */ -static uint32_t kCompilerOptimizerDisableFlags = 0 | // Disable specific optimizations +static uint32_t kCompilerOptimizerDisableFlags = 0 | // Disable specific optimizations (1 << kLoadStoreElimination) | - //(1 << kLoadHoisting) | - //(1 << kSuppressLoads) | - //(1 << kNullCheckElimination) | - //(1 << kPromoteRegs) | - //(1 << kTrackLiveTemps) | - //(1 << kSafeOptimizations) | - //(1 << kBBOpt) | - //(1 << kMatch) | - //(1 << kPromoteCompilerTemps) | + // (1 << kLoadHoisting) | + // (1 << kSuppressLoads) | + // (1 << kNullCheckElimination) | + // (1 << kPromoteRegs) | + // (1 << kTrackLiveTemps) | + // (1 << kSafeOptimizations) | + // (1 << kBBOpt) | + // (1 << kMatch) | + // (1 << kPromoteCompilerTemps) | 0; static uint32_t kCompilerDebugFlags = 0 | // Enable debug/testing modes - //(1 << kDebugDisplayMissingTargets) | - //(1 << kDebugVerbose) | - //(1 << kDebugDumpCFG) | - //(1 << kDebugSlowFieldPath) | - //(1 << kDebugSlowInvokePath) | - //(1 << kDebugSlowStringPath) | - //(1 << kDebugSlowestFieldPath) | - //(1 << kDebugSlowestStringPath) | - //(1 << kDebugExerciseResolveMethod) | - //(1 << kDebugVerifyDataflow) | - //(1 << kDebugShowMemoryUsage) | - //(1 << kDebugShowNops) | - //(1 << kDebugCountOpcodes) | - //(1 << kDebugDumpCheckStats) | - //(1 << kDebugDumpBitcodeFile) | - //(1 << kDebugVerifyBitcode) | - //(1 << kDebugShowSummaryMemoryUsage) | + // (1 << kDebugDisplayMissingTargets) | + // (1 << kDebugVerbose) | + // (1 << kDebugDumpCFG) | + // (1 << kDebugSlowFieldPath) | + // (1 << kDebugSlowInvokePath) | + // (1 << kDebugSlowStringPath) | + // (1 << kDebugSlowestFieldPath) | + // (1 << kDebugSlowestStringPath) | + // (1 << kDebugExerciseResolveMethod) | + // (1 << kDebugVerifyDataflow) | + // (1 << kDebugShowMemoryUsage) | + // (1 << kDebugShowNops) | + // (1 << kDebugCountOpcodes) | + // (1 << kDebugDumpCheckStats) | + // (1 << kDebugDumpBitcodeFile) | + // (1 << kDebugVerifyBitcode) | + // (1 << kDebugShowSummaryMemoryUsage) | 0; static CompiledMethod* CompileMethod(CompilerDriver& compiler, @@ -277,7 +277,7 @@ CompiledMethod* CompileOneMethod(CompilerDriver& compiler, #if defined(ART_USE_PORTABLE_COMPILER) , llvm_compilation_unit #endif - ); // NOLINT(whitespace/parens) + ); // NOLINT(whitespace/parens) } } // namespace art diff --git a/compiler/dex/frontend.h b/compiler/dex/frontend.h index a86338950c..5c68ab4244 100644 --- a/compiler/dex/frontend.h +++ b/compiler/dex/frontend.h @@ -102,7 +102,7 @@ class LLVMInfo { private: UniquePtr< ::llvm::LLVMContext> llvm_context_; - ::llvm::Module* llvm_module_; // Managed by context_. + ::llvm::Module* llvm_module_; // Managed by context_. UniquePtr intrinsic_helper_; UniquePtr ir_builder_; }; diff --git a/compiler/dex/local_value_numbering.h b/compiler/dex/local_value_numbering.h index e3fd7ad2da..33ca8f1ad8 100644 --- a/compiler/dex/local_value_numbering.h +++ b/compiler/dex/local_value_numbering.h @@ -137,6 +137,6 @@ class LocalValueNumbering { std::set null_checked_; }; -} // namespace art +} // namespace art #endif // ART_COMPILER_DEX_LOCAL_VALUE_NUMBERING_H_ diff --git a/compiler/dex/mir_graph.cc b/compiler/dex/mir_graph.cc index 264604c355..6b010ed9b3 100644 --- a/compiler/dex/mir_graph.cc +++ b/compiler/dex/mir_graph.cc @@ -972,23 +972,23 @@ char* MIRGraph::GetDalvikDisassembly(const MIR* mir) { } } switch (dalvik_format) { - case Instruction::k11n: // Add one immediate from vB + case Instruction::k11n: // Add one immediate from vB case Instruction::k21s: case Instruction::k31i: case Instruction::k21h: str.append(StringPrintf(", #%d", insn.vB)); break; - case Instruction::k51l: // Add one wide immediate + case Instruction::k51l: // Add one wide immediate str.append(StringPrintf(", #%lld", insn.vB_wide)); break; - case Instruction::k21c: // One register, one string/type/method index + case Instruction::k21c: // One register, one string/type/method index case Instruction::k31c: str.append(StringPrintf(", index #%d", insn.vB)); break; - case Instruction::k22c: // Two registers, one string/type/method index + case Instruction::k22c: // Two registers, one string/type/method index str.append(StringPrintf(", index #%d", insn.vC)); break; - case Instruction::k22s: // Add one immediate from vC + case Instruction::k22s: // Add one immediate from vC case Instruction::k22b: str.append(StringPrintf(", #%d", insn.vC)); break; @@ -1154,4 +1154,4 @@ BasicBlock* MIRGraph::NewMemBB(BBType block_type, int block_id) { return bb; } -} // namespace art +} // namespace art diff --git a/compiler/dex/mir_graph.h b/compiler/dex/mir_graph.h index 342d2a296a..e9ec949f23 100644 --- a/compiler/dex/mir_graph.h +++ b/compiler/dex/mir_graph.h @@ -273,7 +273,7 @@ struct RegLocation { unsigned fp:1; // Floating point? unsigned core:1; // Non-floating point? unsigned ref:1; // Something GC cares about. - unsigned high_word:1; // High word of pair? + unsigned high_word:1; // High word of pair? unsigned home:1; // Does this represent the home location? uint8_t low_reg; // First physical register. uint8_t high_reg; // 2nd physical register (if wide). @@ -650,7 +650,7 @@ class MIRGraph { BasicBlock* cur_block_; int num_blocks_; const DexFile::CodeItem* current_code_item_; - SafeMap block_map_; // FindBlock lookup cache. + SafeMap block_map_; // FindBlock lookup cache. std::vector m_units_; // List of methods included in this graph typedef std::pair MIRLocation; // Insert point, (m_unit_ index, offset) std::vector method_stack_; // Include stack @@ -659,7 +659,7 @@ class MIRGraph { int def_count_; // Used to estimate size of ssa name storage. int* opcode_count_; // Dex opcode coverage stats. int num_ssa_regs_; // Number of names following SSA transformation. - std::vector extended_basic_blocks_; // Heads of block "traces". + std::vector extended_basic_blocks_; // Heads of block "traces". int method_sreg_; unsigned int attributes_; Checkstats* checkstats_; diff --git a/compiler/dex/mir_optimization.cc b/compiler/dex/mir_optimization.cc index d79b26e4b9..a6314f4cab 100644 --- a/compiler/dex/mir_optimization.cc +++ b/compiler/dex/mir_optimization.cc @@ -845,7 +845,7 @@ bool MIRGraph::BuildExtendedBBList(struct BasicBlock* bb) { bb = NextDominatedBlock(bb); } } - return false; // Not iterative - return value will be ignored + return false; // Not iterative - return value will be ignored } diff --git a/compiler/dex/portable/mir_to_gbc.cc b/compiler/dex/portable/mir_to_gbc.cc index 6fc01bdff2..7831cf6f7a 100644 --- a/compiler/dex/portable/mir_to_gbc.cc +++ b/compiler/dex/portable/mir_to_gbc.cc @@ -1648,7 +1648,7 @@ bool MirConverter::BlockBitcodeConversion(BasicBlock* bb) { if (bb->block_type == kEntryBlock) { SetMethodInfo(); - { // Allocate shadowframe. + { // Allocate shadowframe. art::llvm::IntrinsicHelper::IntrinsicId id = art::llvm::IntrinsicHelper::AllocaShadowFrame; ::llvm::Function* func = intrinsic_helper_->GetIntrinsicFunction(id); @@ -1656,7 +1656,7 @@ bool MirConverter::BlockBitcodeConversion(BasicBlock* bb) { irb_->CreateCall(func, entries); } - { // Store arguments to vregs. + { // Store arguments to vregs. uint16_t arg_reg = cu_->num_regs; ::llvm::Function::arg_iterator arg_iter(func_->arg_begin()); @@ -1666,7 +1666,7 @@ bool MirConverter::BlockBitcodeConversion(BasicBlock* bb) { uint32_t shorty_size = strlen(shorty); CHECK_GE(shorty_size, 1u); - ++arg_iter; // skip method object + ++arg_iter; // skip method object if ((cu_->access_flags & kAccStatic) == 0) { SetVregOnValue(arg_iter, arg_reg); diff --git a/compiler/dex/quick/arm/arm_lir.h b/compiler/dex/quick/arm/arm_lir.h index 93fee05e4e..2f54190ae7 100644 --- a/compiler/dex/quick/arm/arm_lir.h +++ b/compiler/dex/quick/arm/arm_lir.h @@ -239,7 +239,7 @@ enum ArmShiftEncodings { */ enum ArmOpcode { kArmFirst = 0, - kArm16BitData = kArmFirst, // DATA [0] rd[15..0]. + kArm16BitData = kArmFirst, // DATA [0] rd[15..0]. kThumbAdcRR, // adc [0100000101] rm[5..3] rd[2..0]. kThumbAddRRI3, // add(1) [0001110] imm_3[8..6] rn[5..3] rd[2..0]*/ kThumbAddRI8, // add(2) [00110] rd[10..8] imm_8[7..0]. @@ -332,12 +332,12 @@ enum ArmOpcode { kThumb2VcvtDF, // vcvt.F32.F64 vd, vm [1110111010110111] vd[15..12] [10111100] vm[3..0]. kThumb2Vsqrts, // vsqrt.f32 vd, vm [1110111010110001] vd[15..12] [10101100] vm[3..0]. kThumb2Vsqrtd, // vsqrt.f64 vd, vm [1110111010110001] vd[15..12] [10111100] vm[3..0]. - kThumb2MovImmShift,// mov(T2) rd, # [11110] i [00001001111] imm3 rd[11..8] imm8. + kThumb2MovImmShift, // mov(T2) rd, # [11110] i [00001001111] imm3 rd[11..8] imm8. kThumb2MovImm16, // mov(T3) rd, # [11110] i [0010100] imm4 [0] imm3 rd[11..8] imm8. kThumb2StrRRI12, // str(Imm,T3) rd,[rn,#imm12] [111110001100] rn[19..16] rt[15..12] imm12[11..0]. kThumb2LdrRRI12, // str(Imm,T3) rd,[rn,#imm12] [111110001100] rn[19..16] rt[15..12] imm12[11..0]. - kThumb2StrRRI8Predec, // str(Imm,T4) rd,[rn,#-imm8] [111110000100] rn[19..16] rt[15..12] [1100] imm[7..0]*/ - kThumb2LdrRRI8Predec, // ldr(Imm,T4) rd,[rn,#-imm8] [111110000101] rn[19..16] rt[15..12] [1100] imm[7..0]*/ + kThumb2StrRRI8Predec, // str(Imm,T4) rd,[rn,#-imm8] [111110000100] rn[19..16] rt[15..12] [1100] imm[7..0]*/ + kThumb2LdrRRI8Predec, // ldr(Imm,T4) rd,[rn,#-imm8] [111110000101] rn[19..16] rt[15..12] [1100] imm[7..0]*/ kThumb2Cbnz, // cbnz rd,