Adjust art::HTypeConversion's side effects for MIPS64.
Also improve debugging information in
art::CodeGenerator::ValidateInvokeRuntime.
Change-Id: Icfcd1a5cfa5e5449a316251dc20547de6badecb5
diff --git a/compiler/optimizing/code_generator.cc b/compiler/optimizing/code_generator.cc
index 77d6628..d0b5ffd 100644
--- a/compiler/optimizing/code_generator.cc
+++ b/compiler/optimizing/code_generator.cc
@@ -1010,27 +1010,34 @@
// coherent with the runtime call generated, and that the GC side effect is
// set when required.
if (slow_path == nullptr) {
- DCHECK(instruction->GetLocations()->WillCall());
- DCHECK(instruction->GetSideEffects().Includes(SideEffects::CanTriggerGC()));
+ DCHECK(instruction->GetLocations()->WillCall()) << instruction->DebugName();
+ DCHECK(instruction->GetSideEffects().Includes(SideEffects::CanTriggerGC()))
+ << instruction->DebugName() << instruction->GetSideEffects().ToString();
} else {
- DCHECK(instruction->GetLocations()->OnlyCallsOnSlowPath() || slow_path->IsFatal());
+ DCHECK(instruction->GetLocations()->OnlyCallsOnSlowPath() || slow_path->IsFatal())
+ << instruction->DebugName() << slow_path->GetDescription();
DCHECK(instruction->GetSideEffects().Includes(SideEffects::CanTriggerGC()) ||
// Control flow would not come back into the code if a fatal slow
// path is taken, so we do not care if it triggers GC.
slow_path->IsFatal() ||
// HDeoptimize is a special case: we know we are not coming back from
// it into the code.
- instruction->IsDeoptimize());
+ instruction->IsDeoptimize())
+ << instruction->DebugName() << instruction->GetSideEffects().ToString()
+ << slow_path->GetDescription();
}
// Check the coherency of leaf information.
DCHECK(instruction->IsSuspendCheck()
|| ((slow_path != nullptr) && slow_path->IsFatal())
|| instruction->GetLocations()->CanCall()
- || !IsLeafMethod());
+ || !IsLeafMethod())
+ << instruction->DebugName() << ((slow_path != nullptr) ? slow_path->GetDescription() : "");
}
-void SlowPathCode::RecordPcInfo(CodeGenerator* codegen, HInstruction* instruction, uint32_t dex_pc) {
+void SlowPathCode::RecordPcInfo(CodeGenerator* codegen,
+ HInstruction* instruction,
+ uint32_t dex_pc) {
codegen->RecordPcInfo(instruction, dex_pc, this);
}
diff --git a/compiler/optimizing/nodes.h b/compiler/optimizing/nodes.h
index 89709fa..a7ff67e 100644
--- a/compiler/optimizing/nodes.h
+++ b/compiler/optimizing/nodes.h
@@ -3738,9 +3738,8 @@
// Some architectures may not require the 'GC' side effects, but at this point
// in the compilation process we do not know what architecture we will
// generate code for, so we must be conservative.
- if (((input_type == Primitive::kPrimFloat || input_type == Primitive::kPrimDouble)
- && result_type == Primitive::kPrimLong)
- || (input_type == Primitive::kPrimLong && result_type == Primitive::kPrimFloat)) {
+ if ((Primitive::IsFloatingPointType(input_type) && Primitive::IsIntegralType(result_type))
+ || (input_type == Primitive::kPrimLong && Primitive::IsFloatingPointType(result_type))) {
return SideEffects::CanTriggerGC();
}
return SideEffects::None();