summaryrefslogtreecommitdiff
path: root/compiler/optimizing
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/optimizing')
-rw-r--r--compiler/optimizing/block_builder.cc2
-rw-r--r--compiler/optimizing/instruction_builder.cc26
-rw-r--r--compiler/optimizing/instruction_builder.h4
-rw-r--r--compiler/optimizing/nodes.cc1
-rw-r--r--compiler/optimizing/ssa_builder.cc4
5 files changed, 22 insertions, 15 deletions
diff --git a/compiler/optimizing/block_builder.cc b/compiler/optimizing/block_builder.cc
index a6687fe258..ed000327ff 100644
--- a/compiler/optimizing/block_builder.cc
+++ b/compiler/optimizing/block_builder.cc
@@ -58,6 +58,7 @@ bool HBasicBlockBuilder::CreateBranchTargets() {
// cannot have any code afterwards.
} else {
// The TryItem spans beyond the end of the CodeItem. This is invalid code.
+ VLOG(compiler) << "Not compiled: TryItem spans beyond the end of the CodeItem";
return false;
}
}
@@ -110,6 +111,7 @@ bool HBasicBlockBuilder::CreateBranchTargets() {
if (next == instructions.end()) {
// In the normal case we should never hit this but someone can artificially forge a dex
// file to fall-through out the method code. In this case we bail out compilation.
+ VLOG(compiler) << "Not compiled: Fall-through beyond the CodeItem";
return false;
}
MaybeCreateBlockAt(next.DexPc());
diff --git a/compiler/optimizing/instruction_builder.cc b/compiler/optimizing/instruction_builder.cc
index 61840cc20f..214b2539e0 100644
--- a/compiler/optimizing/instruction_builder.cc
+++ b/compiler/optimizing/instruction_builder.cc
@@ -1349,6 +1349,8 @@ bool HInstructionBuilder::BuildInstanceFieldAccess(const Instruction& instructio
uint16_t field_index;
if (instruction.IsQuickened()) {
if (!CanDecodeQuickenedInfo()) {
+ VLOG(compiler) << "Not compiled: Could not decode quickened instruction "
+ << instruction.Opcode();
return false;
}
field_index = LookupQuickenedInfo(quicken_index);
@@ -1485,7 +1487,6 @@ ArtField* HInstructionBuilder::ResolveField(uint16_t field_idx, bool is_static,
dex_compilation_unit_->GetDexCache(),
class_loader,
is_static);
-
if (UNLIKELY(resolved_field == nullptr)) {
// Clean up any exception left by type resolution.
soa.Self()->ClearException();
@@ -1521,7 +1522,7 @@ ArtField* HInstructionBuilder::ResolveField(uint16_t field_idx, bool is_static,
return resolved_field;
}
-bool HInstructionBuilder::BuildStaticFieldAccess(const Instruction& instruction,
+void HInstructionBuilder::BuildStaticFieldAccess(const Instruction& instruction,
uint32_t dex_pc,
bool is_put) {
uint32_t source_or_dest_reg = instruction.VRegA_21c();
@@ -1535,7 +1536,7 @@ bool HInstructionBuilder::BuildStaticFieldAccess(const Instruction& instruction,
MethodCompilationStat::kUnresolvedField);
DataType::Type field_type = GetFieldAccessType(*dex_file_, field_index);
BuildUnresolvedStaticFieldAccess(instruction, dex_pc, is_put, field_type);
- return true;
+ return;
}
DataType::Type field_type = GetFieldAccessType(*dex_file_, field_index);
@@ -1553,7 +1554,7 @@ bool HInstructionBuilder::BuildStaticFieldAccess(const Instruction& instruction,
MaybeRecordStat(compilation_stats_,
MethodCompilationStat::kUnresolvedFieldNotAFastAccess);
BuildUnresolvedStaticFieldAccess(instruction, dex_pc, is_put, field_type);
- return true;
+ return;
}
HInstruction* cls = constant;
@@ -1589,7 +1590,6 @@ bool HInstructionBuilder::BuildStaticFieldAccess(const Instruction& instruction,
dex_pc));
UpdateLocal(source_or_dest_reg, current_block_->GetLastInstruction());
}
- return true;
}
void HInstructionBuilder::BuildCheckedDivRem(uint16_t out_vreg,
@@ -2056,6 +2056,8 @@ bool HInstructionBuilder::ProcessDexInstruction(const Instruction& instruction,
uint16_t method_idx;
if (instruction.Opcode() == Instruction::INVOKE_VIRTUAL_QUICK) {
if (!CanDecodeQuickenedInfo()) {
+ VLOG(compiler) << "Not compiled: Could not decode quickened instruction "
+ << instruction.Opcode();
return false;
}
method_idx = LookupQuickenedInfo(quicken_index);
@@ -2081,6 +2083,8 @@ bool HInstructionBuilder::ProcessDexInstruction(const Instruction& instruction,
uint16_t method_idx;
if (instruction.Opcode() == Instruction::INVOKE_VIRTUAL_RANGE_QUICK) {
if (!CanDecodeQuickenedInfo()) {
+ VLOG(compiler) << "Not compiled: Could not decode quickened instruction "
+ << instruction.Opcode();
return false;
}
method_idx = LookupQuickenedInfo(quicken_index);
@@ -2756,7 +2760,7 @@ bool HInstructionBuilder::ProcessDexInstruction(const Instruction& instruction,
case Instruction::IGET_CHAR_QUICK:
case Instruction::IGET_SHORT:
case Instruction::IGET_SHORT_QUICK: {
- if (!BuildInstanceFieldAccess(instruction, dex_pc, false, quicken_index)) {
+ if (!BuildInstanceFieldAccess(instruction, dex_pc, /* is_put */ false, quicken_index)) {
return false;
}
break;
@@ -2776,7 +2780,7 @@ bool HInstructionBuilder::ProcessDexInstruction(const Instruction& instruction,
case Instruction::IPUT_CHAR_QUICK:
case Instruction::IPUT_SHORT:
case Instruction::IPUT_SHORT_QUICK: {
- if (!BuildInstanceFieldAccess(instruction, dex_pc, true, quicken_index)) {
+ if (!BuildInstanceFieldAccess(instruction, dex_pc, /* is_put */ true, quicken_index)) {
return false;
}
break;
@@ -2789,9 +2793,7 @@ bool HInstructionBuilder::ProcessDexInstruction(const Instruction& instruction,
case Instruction::SGET_BYTE:
case Instruction::SGET_CHAR:
case Instruction::SGET_SHORT: {
- if (!BuildStaticFieldAccess(instruction, dex_pc, false)) {
- return false;
- }
+ BuildStaticFieldAccess(instruction, dex_pc, /* is_put */ false);
break;
}
@@ -2802,9 +2804,7 @@ bool HInstructionBuilder::ProcessDexInstruction(const Instruction& instruction,
case Instruction::SPUT_BYTE:
case Instruction::SPUT_CHAR:
case Instruction::SPUT_SHORT: {
- if (!BuildStaticFieldAccess(instruction, dex_pc, true)) {
- return false;
- }
+ BuildStaticFieldAccess(instruction, dex_pc, /* is_put */ true);
break;
}
diff --git a/compiler/optimizing/instruction_builder.h b/compiler/optimizing/instruction_builder.h
index f551ac4280..2446ddb86a 100644
--- a/compiler/optimizing/instruction_builder.h
+++ b/compiler/optimizing/instruction_builder.h
@@ -175,8 +175,8 @@ class HInstructionBuilder : public ValueObject {
uint32_t dex_pc,
bool is_put,
DataType::Type field_type);
- // Builds a static field access node and returns whether the instruction is supported.
- bool BuildStaticFieldAccess(const Instruction& instruction, uint32_t dex_pc, bool is_put);
+ // Builds a static field access node.
+ void BuildStaticFieldAccess(const Instruction& instruction, uint32_t dex_pc, bool is_put);
void BuildArrayAccess(const Instruction& instruction,
uint32_t dex_pc,
diff --git a/compiler/optimizing/nodes.cc b/compiler/optimizing/nodes.cc
index fa580d9bed..ff4e9aa510 100644
--- a/compiler/optimizing/nodes.cc
+++ b/compiler/optimizing/nodes.cc
@@ -507,6 +507,7 @@ GraphAnalysisResult HGraph::AnalyzeLoops() const {
if (block->IsCatchBlock()) {
// TODO: Dealing with exceptional back edges could be tricky because
// they only approximate the real control flow. Bail out for now.
+ VLOG(compiler) << "Not compiled: Exceptional back edges";
return kAnalysisFailThrowCatchLoop;
}
block->GetLoopInformation()->Populate();
diff --git a/compiler/optimizing/ssa_builder.cc b/compiler/optimizing/ssa_builder.cc
index e4edbfdc24..cb384768b7 100644
--- a/compiler/optimizing/ssa_builder.cc
+++ b/compiler/optimizing/ssa_builder.cc
@@ -328,6 +328,8 @@ bool SsaBuilder::FixAmbiguousArrayOps() {
HInstruction* array = aget_int->GetArray();
if (!array->GetReferenceTypeInfo().IsPrimitiveArrayClass()) {
// RTP did not type the input array. Bail.
+ VLOG(compiler) << "Not compiled: Could not infer an array type for array operation at "
+ << aget_int->GetDexPc();
return false;
}
@@ -368,6 +370,8 @@ bool SsaBuilder::FixAmbiguousArrayOps() {
HInstruction* array = aset->GetArray();
if (!array->GetReferenceTypeInfo().IsPrimitiveArrayClass()) {
// RTP did not type the input array. Bail.
+ VLOG(compiler) << "Not compiled: Could not infer an array type for array operation at "
+ << aset->GetDexPc();
return false;
}