[turbofan] Use shortcut kEliminatable in some operator definitions
Change-Id: I9388a6b4f684a1567e1cbae9ee4784e43a99633e Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2106208 Auto-Submit: Georg Neis <neis@chromium.org> Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#66761}
This commit is contained in:
parent
8cb5dea960
commit
abf92c0614
@ -617,56 +617,52 @@ struct MachineOperatorGlobalCache {
|
||||
OVERFLOW_OP_LIST(OVERFLOW_OP)
|
||||
#undef OVERFLOW_OP
|
||||
|
||||
#define LOAD(Type) \
|
||||
struct Load##Type##Operator final : public Operator1<LoadRepresentation> { \
|
||||
Load##Type##Operator() \
|
||||
: Operator1<LoadRepresentation>( \
|
||||
IrOpcode::kLoad, \
|
||||
Operator::kNoDeopt | Operator::kNoThrow | Operator::kNoWrite, \
|
||||
"Load", 2, 1, 1, 1, 1, 0, MachineType::Type()) {} \
|
||||
}; \
|
||||
struct PoisonedLoad##Type##Operator final \
|
||||
: public Operator1<LoadRepresentation> { \
|
||||
PoisonedLoad##Type##Operator() \
|
||||
: Operator1<LoadRepresentation>( \
|
||||
IrOpcode::kPoisonedLoad, \
|
||||
Operator::kNoDeopt | Operator::kNoThrow | Operator::kNoWrite, \
|
||||
"PoisonedLoad", 2, 1, 1, 1, 1, 0, MachineType::Type()) {} \
|
||||
}; \
|
||||
struct UnalignedLoad##Type##Operator final \
|
||||
: public Operator1<LoadRepresentation> { \
|
||||
UnalignedLoad##Type##Operator() \
|
||||
: Operator1<LoadRepresentation>( \
|
||||
IrOpcode::kUnalignedLoad, \
|
||||
Operator::kNoDeopt | Operator::kNoThrow | Operator::kNoWrite, \
|
||||
"UnalignedLoad", 2, 1, 1, 1, 1, 0, MachineType::Type()) {} \
|
||||
}; \
|
||||
struct ProtectedLoad##Type##Operator final \
|
||||
: public Operator1<LoadRepresentation> { \
|
||||
ProtectedLoad##Type##Operator() \
|
||||
: Operator1<LoadRepresentation>( \
|
||||
IrOpcode::kProtectedLoad, \
|
||||
Operator::kNoDeopt | Operator::kNoThrow, "ProtectedLoad", 2, 1, \
|
||||
1, 1, 1, 0, MachineType::Type()) {} \
|
||||
}; \
|
||||
Load##Type##Operator kLoad##Type; \
|
||||
PoisonedLoad##Type##Operator kPoisonedLoad##Type; \
|
||||
UnalignedLoad##Type##Operator kUnalignedLoad##Type; \
|
||||
#define LOAD(Type) \
|
||||
struct Load##Type##Operator final : public Operator1<LoadRepresentation> { \
|
||||
Load##Type##Operator() \
|
||||
: Operator1<LoadRepresentation>(IrOpcode::kLoad, \
|
||||
Operator::kEliminatable, "Load", 2, 1, \
|
||||
1, 1, 1, 0, MachineType::Type()) {} \
|
||||
}; \
|
||||
struct PoisonedLoad##Type##Operator final \
|
||||
: public Operator1<LoadRepresentation> { \
|
||||
PoisonedLoad##Type##Operator() \
|
||||
: Operator1<LoadRepresentation>( \
|
||||
IrOpcode::kPoisonedLoad, Operator::kEliminatable, \
|
||||
"PoisonedLoad", 2, 1, 1, 1, 1, 0, MachineType::Type()) {} \
|
||||
}; \
|
||||
struct UnalignedLoad##Type##Operator final \
|
||||
: public Operator1<LoadRepresentation> { \
|
||||
UnalignedLoad##Type##Operator() \
|
||||
: Operator1<LoadRepresentation>( \
|
||||
IrOpcode::kUnalignedLoad, Operator::kEliminatable, \
|
||||
"UnalignedLoad", 2, 1, 1, 1, 1, 0, MachineType::Type()) {} \
|
||||
}; \
|
||||
struct ProtectedLoad##Type##Operator final \
|
||||
: public Operator1<LoadRepresentation> { \
|
||||
ProtectedLoad##Type##Operator() \
|
||||
: Operator1<LoadRepresentation>( \
|
||||
IrOpcode::kProtectedLoad, \
|
||||
Operator::kNoDeopt | Operator::kNoThrow, "ProtectedLoad", 2, 1, \
|
||||
1, 1, 1, 0, MachineType::Type()) {} \
|
||||
}; \
|
||||
Load##Type##Operator kLoad##Type; \
|
||||
PoisonedLoad##Type##Operator kPoisonedLoad##Type; \
|
||||
UnalignedLoad##Type##Operator kUnalignedLoad##Type; \
|
||||
ProtectedLoad##Type##Operator kProtectedLoad##Type;
|
||||
MACHINE_TYPE_LIST(LOAD)
|
||||
#undef LOAD
|
||||
|
||||
#define LOAD_TRANSFORM_KIND(TYPE, KIND) \
|
||||
struct KIND##LoadTransform##TYPE##Operator final \
|
||||
: public Operator1<LoadTransformParameters> { \
|
||||
KIND##LoadTransform##TYPE##Operator() \
|
||||
: Operator1<LoadTransformParameters>( \
|
||||
IrOpcode::kLoadTransform, \
|
||||
Operator::kNoDeopt | Operator::kNoThrow | Operator::kNoWrite, \
|
||||
#KIND "LoadTransform", 2, 1, 1, 1, 1, 0, \
|
||||
LoadTransformParameters{LoadKind::k##KIND, \
|
||||
LoadTransformation::k##TYPE}) {} \
|
||||
}; \
|
||||
#define LOAD_TRANSFORM_KIND(TYPE, KIND) \
|
||||
struct KIND##LoadTransform##TYPE##Operator final \
|
||||
: public Operator1<LoadTransformParameters> { \
|
||||
KIND##LoadTransform##TYPE##Operator() \
|
||||
: Operator1<LoadTransformParameters>( \
|
||||
IrOpcode::kLoadTransform, Operator::kEliminatable, \
|
||||
#KIND "LoadTransform", 2, 1, 1, 1, 1, 0, \
|
||||
LoadTransformParameters{LoadKind::k##KIND, \
|
||||
LoadTransformation::k##TYPE}) {} \
|
||||
}; \
|
||||
KIND##LoadTransform##TYPE##Operator k##KIND##LoadTransform##TYPE;
|
||||
|
||||
#define LOAD_TRANSFORM(TYPE) \
|
||||
@ -767,8 +763,7 @@ struct MachineOperatorGlobalCache {
|
||||
: public Operator1<LoadRepresentation> { \
|
||||
Word32AtomicLoad##Type##Operator() \
|
||||
: Operator1<LoadRepresentation>( \
|
||||
IrOpcode::kWord32AtomicLoad, \
|
||||
Operator::kNoDeopt | Operator::kNoThrow | Operator::kNoWrite, \
|
||||
IrOpcode::kWord32AtomicLoad, Operator::kEliminatable, \
|
||||
"Word32AtomicLoad", 2, 1, 1, 1, 1, 0, MachineType::Type()) {} \
|
||||
}; \
|
||||
Word32AtomicLoad##Type##Operator kWord32AtomicLoad##Type;
|
||||
@ -780,8 +775,7 @@ struct MachineOperatorGlobalCache {
|
||||
: public Operator1<LoadRepresentation> { \
|
||||
Word64AtomicLoad##Type##Operator() \
|
||||
: Operator1<LoadRepresentation>( \
|
||||
IrOpcode::kWord64AtomicLoad, \
|
||||
Operator::kNoDeopt | Operator::kNoThrow | Operator::kNoWrite, \
|
||||
IrOpcode::kWord64AtomicLoad, Operator::kEliminatable, \
|
||||
"Word64AtomicLoad", 2, 1, 1, 1, 1, 0, MachineType::Type()) {} \
|
||||
}; \
|
||||
Word64AtomicLoad##Type##Operator kWord64AtomicLoad##Type;
|
||||
|
@ -854,16 +854,14 @@ struct SimplifiedOperatorGlobalCache final {
|
||||
PURE_OP_LIST(PURE)
|
||||
#undef PURE
|
||||
|
||||
#define EFFECT_DEPENDENT(Name, properties, value_input_count, \
|
||||
control_input_count) \
|
||||
struct Name##Operator final : public Operator { \
|
||||
Name##Operator() \
|
||||
: Operator(IrOpcode::k##Name, \
|
||||
Operator::kNoDeopt | Operator::kNoWrite | \
|
||||
Operator::kNoThrow | properties, \
|
||||
#Name, value_input_count, 1, control_input_count, 1, 1, \
|
||||
0) {} \
|
||||
}; \
|
||||
#define EFFECT_DEPENDENT(Name, properties, value_input_count, \
|
||||
control_input_count) \
|
||||
struct Name##Operator final : public Operator { \
|
||||
Name##Operator() \
|
||||
: Operator(IrOpcode::k##Name, Operator::kEliminatable | properties, \
|
||||
#Name, value_input_count, 1, control_input_count, 1, 1, \
|
||||
0) {} \
|
||||
}; \
|
||||
Name##Operator k##Name;
|
||||
EFFECT_DEPENDENT_OP_LIST(EFFECT_DEPENDENT)
|
||||
#undef EFFECT_DEPENDENT
|
||||
@ -1129,10 +1127,9 @@ struct SimplifiedOperatorGlobalCache final {
|
||||
LoadStackArgumentOperator()
|
||||
: Operator( // --
|
||||
IrOpcode::kLoadStackArgument, // opcode
|
||||
Operator::kNoDeopt | Operator::kNoThrow |
|
||||
Operator::kNoWrite, // flags
|
||||
"LoadStackArgument", // name
|
||||
2, 1, 1, 1, 1, 0) {} // counts
|
||||
Operator::kEliminatable, // flags
|
||||
"LoadStackArgument", // name
|
||||
2, 1, 1, 1, 1, 0) {} // counts
|
||||
};
|
||||
LoadStackArgumentOperator kLoadStackArgument;
|
||||
|
||||
@ -1730,9 +1727,8 @@ bool operator==(FastApiCallParameters const& lhs,
|
||||
const Operator* SimplifiedOperatorBuilder::Allocate(Type type,
|
||||
AllocationType allocation) {
|
||||
return new (zone()) Operator1<AllocateParameters>(
|
||||
IrOpcode::kAllocate,
|
||||
Operator::kNoDeopt | Operator::kNoThrow | Operator::kNoWrite, "Allocate",
|
||||
1, 1, 1, 1, 1, 0, AllocateParameters(type, allocation));
|
||||
IrOpcode::kAllocate, Operator::kEliminatable, "Allocate", 1, 1, 1, 1, 1,
|
||||
0, AllocateParameters(type, allocation));
|
||||
}
|
||||
|
||||
const Operator* SimplifiedOperatorBuilder::AllocateRaw(
|
||||
@ -1744,10 +1740,8 @@ const Operator* SimplifiedOperatorBuilder::AllocateRaw(
|
||||
allocation == AllocationType::kYoung &&
|
||||
!FLAG_young_generation_large_objects));
|
||||
return new (zone()) Operator1<AllocateParameters>(
|
||||
IrOpcode::kAllocateRaw,
|
||||
Operator::kNoDeopt | Operator::kNoThrow | Operator::kNoWrite,
|
||||
"AllocateRaw", 1, 1, 1, 1, 1, 1,
|
||||
AllocateParameters(type, allocation, allow_large_objects));
|
||||
IrOpcode::kAllocateRaw, Operator::kEliminatable, "AllocateRaw", 1, 1, 1,
|
||||
1, 1, 1, AllocateParameters(type, allocation, allow_large_objects));
|
||||
}
|
||||
|
||||
#define SPECULATIVE_NUMBER_BINOP(Name) \
|
||||
@ -1795,10 +1789,8 @@ ACCESS_OP_LIST(ACCESS)
|
||||
#undef ACCESS
|
||||
|
||||
const Operator* SimplifiedOperatorBuilder::LoadMessage() {
|
||||
return new (zone())
|
||||
Operator(IrOpcode::kLoadMessage,
|
||||
Operator::kNoDeopt | Operator::kNoThrow | Operator::kNoWrite,
|
||||
"LoadMessage", 1, 1, 1, 1, 1, 0);
|
||||
return new (zone()) Operator(IrOpcode::kLoadMessage, Operator::kEliminatable,
|
||||
"LoadMessage", 1, 1, 1, 1, 1, 0);
|
||||
}
|
||||
|
||||
const Operator* SimplifiedOperatorBuilder::StoreMessage() {
|
||||
|
Loading…
Reference in New Issue
Block a user