summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'compiler')
-rw-r--r--compiler/optimizing/code_generator_riscv64.cc1
-rw-r--r--compiler/optimizing/code_generator_x86.cc2
-rw-r--r--compiler/optimizing/code_generator_x86_64.cc2
-rw-r--r--compiler/optimizing/inliner.cc1
-rw-r--r--compiler/optimizing/intrinsics_x86.cc5
-rw-r--r--compiler/optimizing/intrinsics_x86_64.cc8
-rw-r--r--compiler/optimizing/loop_optimization.cc30
-rw-r--r--compiler/optimizing/loop_optimization.h1
-rw-r--r--compiler/optimizing/optimizing_compiler.cc1
-rw-r--r--compiler/utils/atomic_dex_ref_map-inl.h1
-rw-r--r--compiler/utils/x86_64/assembler_x86_64.h2
11 files changed, 22 insertions, 32 deletions
diff --git a/compiler/optimizing/code_generator_riscv64.cc b/compiler/optimizing/code_generator_riscv64.cc
index abbd74ac65..451481bceb 100644
--- a/compiler/optimizing/code_generator_riscv64.cc
+++ b/compiler/optimizing/code_generator_riscv64.cc
@@ -122,7 +122,6 @@ Location Riscv64ReturnLocation(DataType::Type return_type) {
case DataType::Type::kVoid:
return Location::NoLocation();
}
- UNREACHABLE();
}
static RegisterSet OneRegInReferenceOutSaveEverythingCallerSaves() {
diff --git a/compiler/optimizing/code_generator_x86.cc b/compiler/optimizing/code_generator_x86.cc
index 21d3492e8a..55fb4ee3d3 100644
--- a/compiler/optimizing/code_generator_x86.cc
+++ b/compiler/optimizing/code_generator_x86.cc
@@ -1506,8 +1506,6 @@ Location InvokeDexCallingConventionVisitorX86::GetReturnLocation(DataType::Type
case DataType::Type::kFloat32:
return Location::FpuRegisterLocation(XMM0);
}
-
- UNREACHABLE();
}
Location InvokeDexCallingConventionVisitorX86::GetMethodLocation() const {
diff --git a/compiler/optimizing/code_generator_x86_64.cc b/compiler/optimizing/code_generator_x86_64.cc
index af6c6255e5..f94514e08e 100644
--- a/compiler/optimizing/code_generator_x86_64.cc
+++ b/compiler/optimizing/code_generator_x86_64.cc
@@ -2950,8 +2950,6 @@ Location InvokeDexCallingConventionVisitorX86_64::GetReturnLocation(DataType::Ty
case DataType::Type::kFloat32:
return Location::FpuRegisterLocation(XMM0);
}
-
- UNREACHABLE();
}
Location InvokeDexCallingConventionVisitorX86_64::GetMethodLocation() const {
diff --git a/compiler/optimizing/inliner.cc b/compiler/optimizing/inliner.cc
index 0fd3eeab2e..02cf8a4052 100644
--- a/compiler/optimizing/inliner.cc
+++ b/compiler/optimizing/inliner.cc
@@ -684,7 +684,6 @@ bool HInliner::TryInlineFromInlineCache(HInvoke* invoke_instruction)
return false;
}
}
- UNREACHABLE();
}
HInliner::InlineCacheType HInliner::GetInlineCacheJIT(
diff --git a/compiler/optimizing/intrinsics_x86.cc b/compiler/optimizing/intrinsics_x86.cc
index b21f36cfcf..62efeb1d8c 100644
--- a/compiler/optimizing/intrinsics_x86.cc
+++ b/compiler/optimizing/intrinsics_x86.cc
@@ -3816,7 +3816,7 @@ static void GenerateVarHandleCommonChecks(HInvoke *invoke,
break;
}
default:
- // Unimplemented
+ LOG(FATAL) << "Unexpected coordinates count: " << expected_coordinates_count;
UNREACHABLE();
}
@@ -4350,6 +4350,7 @@ static void GenerateVarHandleGetAndSet(HInvoke* invoke, CodeGeneratorX86* codege
break;
}
default:
+ LOG(FATAL) << "Unexpected type: " << value_type;
UNREACHABLE();
}
@@ -4688,6 +4689,7 @@ static void GenerateVarHandleGetAndAdd(HInvoke* invoke, CodeGeneratorX86* codege
break;
}
default:
+ LOG(FATAL) << "Unexpected type: " << type;
UNREACHABLE();
}
@@ -4782,6 +4784,7 @@ static void GenerateBitwiseOp(HInvoke* invoke,
__ andl(left, right);
break;
default:
+ LOG(FATAL) << "Unexpected intrinsic: " << invoke->GetIntrinsic();
UNREACHABLE();
}
}
diff --git a/compiler/optimizing/intrinsics_x86_64.cc b/compiler/optimizing/intrinsics_x86_64.cc
index 1876a70541..598b95867e 100644
--- a/compiler/optimizing/intrinsics_x86_64.cc
+++ b/compiler/optimizing/intrinsics_x86_64.cc
@@ -4493,7 +4493,7 @@ static void GenerateVarHandleGetAndSet(HInvoke* invoke,
__ xchgq(valreg, field_addr);
break;
default:
- DCHECK(false) << "unexpected type in getAndSet intrinsic";
+ LOG(FATAL) << "unexpected type in getAndSet intrinsic: " << type;
UNREACHABLE();
}
if (byte_swap) {
@@ -4600,7 +4600,7 @@ static void GenerateVarHandleGetAndOp(HInvoke* invoke,
}
break;
default:
- DCHECK(false) << "unexpected operation";
+ LOG(FATAL) << "unexpected operation";
UNREACHABLE();
}
@@ -4628,7 +4628,7 @@ static void GenerateVarHandleGetAndOp(HInvoke* invoke,
__ LockCmpxchgq(field_addr, temp);
break;
default:
- DCHECK(false) << "unexpected type in getAndBitwiseOp intrinsic";
+ LOG(FATAL) << "unexpected type in getAndBitwiseOp intrinsic";
UNREACHABLE();
}
@@ -4800,7 +4800,7 @@ static void GenerateVarHandleGetAndAdd(HInvoke* invoke,
__ LockXaddq(field_addr, valreg);
break;
default:
- DCHECK(false) << "unexpected type in getAndAdd intrinsic";
+ LOG(FATAL) << "unexpected type in getAndAdd intrinsic";
UNREACHABLE();
}
}
diff --git a/compiler/optimizing/loop_optimization.cc b/compiler/optimizing/loop_optimization.cc
index f6d69ca789..28712302c5 100644
--- a/compiler/optimizing/loop_optimization.cc
+++ b/compiler/optimizing/loop_optimization.cc
@@ -2455,13 +2455,9 @@ HInstruction* HLoopOptimization::GenerateVecOp(HInstruction* org,
new (global_allocator_) HAbs(org_type, opa, dex_pc));
case HInstruction::kEqual: {
// Special case.
- if (vector_mode_ == kVector) {
- vector = new (global_allocator_) HVecCondition(
- global_allocator_, opa, opb, type, vector_length_, dex_pc);
- } else {
- DCHECK(vector_mode_ == kSequential);
- UNREACHABLE();
- }
+ DCHECK_EQ(vector_mode_, kVector);
+ vector = new (global_allocator_)
+ HVecCondition(global_allocator_, opa, opb, type, vector_length_, dex_pc);
}
break;
default:
@@ -2772,19 +2768,14 @@ bool HLoopOptimization::VectorizeIfCondition(LoopNode* node,
vector_map_->Get(opa_promoted),
vector_map_->Get(opb_promoted),
type);
+ DCHECK_EQ(vector_mode_, kVector);
+ HInstruction* vec_pred_not = new (global_allocator_)
+ HVecPredNot(global_allocator_, vec_cond, type, vector_length_, hif->GetDexPc());
- if (vector_mode_ == kVector) {
- HInstruction* vec_pred_not = new (global_allocator_) HVecPredNot(
- global_allocator_, vec_cond, type, vector_length_, hif->GetDexPc());
-
- vector_map_->Put(hif, vec_pred_not);
- BlockPredicateInfo* pred_info = predicate_info_map_->Get(hif->GetBlock());
- pred_info->SetControlFlowInfo(vec_cond->AsVecPredSetOperation(),
- vec_pred_not->AsVecPredSetOperation());
- } else {
- DCHECK(vector_mode_ == kSequential);
- UNREACHABLE();
- }
+ vector_map_->Put(hif, vec_pred_not);
+ BlockPredicateInfo* pred_info = predicate_info_map_->Get(hif->GetBlock());
+ pred_info->SetControlFlowInfo(vec_cond->AsVecPredSetOperation(),
+ vec_pred_not->AsVecPredSetOperation());
}
return true;
}
@@ -3140,6 +3131,7 @@ void HLoopOptimization::InitPredicateInfoMap(LoopNode* node,
return;
}
}
+ LOG(FATAL) << "Unreachable";
UNREACHABLE();
}
diff --git a/compiler/optimizing/loop_optimization.h b/compiler/optimizing/loop_optimization.h
index 86a9f0fcb8..2bf32ac095 100644
--- a/compiler/optimizing/loop_optimization.h
+++ b/compiler/optimizing/loop_optimization.h
@@ -108,6 +108,7 @@ class HLoopOptimization : public HOptimization {
* Vectorization mode during synthesis
* (sequential peeling/cleanup loop or vector loop).
*/
+ // TODO(solanes): Change this into enum class
enum VectorMode {
kSequential,
kVector
diff --git a/compiler/optimizing/optimizing_compiler.cc b/compiler/optimizing/optimizing_compiler.cc
index 0e5de00f97..f532681527 100644
--- a/compiler/optimizing/optimizing_compiler.cc
+++ b/compiler/optimizing/optimizing_compiler.cc
@@ -897,6 +897,7 @@ CodeGenerator* OptimizingCompiler::TryCompile(ArenaAllocator* allocator,
break;
}
case kAnalysisSuccess:
+ LOG(FATAL) << "Unreachable";
UNREACHABLE();
}
pass_observer.SetGraphInBadState();
diff --git a/compiler/utils/atomic_dex_ref_map-inl.h b/compiler/utils/atomic_dex_ref_map-inl.h
index 5f68a7c701..653d21b3ea 100644
--- a/compiler/utils/atomic_dex_ref_map-inl.h
+++ b/compiler/utils/atomic_dex_ref_map-inl.h
@@ -46,7 +46,6 @@ inline size_t AtomicDexRefMap<DexFileReferenceType, Value>::NumberOfDexIndices(
if (std::is_same<DexFileReferenceType, TypeReference>::value) {
return dex_file->NumTypeIds();
}
- UNREACHABLE();
}
template <typename DexFileReferenceType, typename Value>
diff --git a/compiler/utils/x86_64/assembler_x86_64.h b/compiler/utils/x86_64/assembler_x86_64.h
index 7f80dbccf7..b7475cd367 100644
--- a/compiler/utils/x86_64/assembler_x86_64.h
+++ b/compiler/utils/x86_64/assembler_x86_64.h
@@ -122,7 +122,7 @@ class Operand : public ValueObject {
return disp32();
default:
// Mod 11b means reg/reg, so there is no address and consequently no displacement.
- DCHECK(false) << "there is no displacement in x86_64 reg/reg operand";
+ LOG(FATAL) << "there is no displacement in x86_64 reg/reg operand";
UNREACHABLE();
}
}