Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(300)

Unified Diff: src/compiler/simplified-operator.cc

Issue 2075443003: [turbofan] Properly mark the Check/Checked operators are pure. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@TurboFan_CheckedOperators
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/simplified-operator.cc
diff --git a/src/compiler/simplified-operator.cc b/src/compiler/simplified-operator.cc
index d6658a6074090604a6695d5e6d07e94e4391ae93..cee25ed21cb7ff14611581c2b438edcd70f4d69f 100644
--- a/src/compiler/simplified-operator.cc
+++ b/src/compiler/simplified-operator.cc
@@ -302,8 +302,8 @@ struct SimplifiedOperatorGlobalCache final {
#define CHECKED(Name) \
struct Name##Operator final : public Operator { \
Name##Operator() \
- : Operator(IrOpcode::k##Name, Operator::kNoThrow, #Name, 1, 1, 1, 1, \
- 1, 0) {} \
+ : Operator(IrOpcode::k##Name, Operator::kPure, #Name, 1, 1, 1, 1, 1, \
+ 0) {} \
}; \
Name##Operator k##Name;
CHECKED_OP_LIST(CHECKED)
@@ -313,9 +313,9 @@ struct SimplifiedOperatorGlobalCache final {
struct CheckFloat64HoleNaNOperatortor final
: public Operator1<CheckFloat64HoleMode> {
CheckFloat64HoleNaNOperatortor()
- : Operator1<CheckFloat64HoleMode>(
- IrOpcode::kCheckFloat64Hole, Operator::kFoldable,
- "CheckFloat64Hole", 1, 1, 1, 1, 1, 0, kMode) {}
+ : Operator1<CheckFloat64HoleMode>(IrOpcode::kCheckFloat64Hole,
+ Operator::kPure, "CheckFloat64Hole",
+ 1, 1, 1, 1, 1, 0, kMode) {}
};
CheckFloat64HoleNaNOperatortor<CheckFloat64HoleMode::kAllowReturnHole>
kCheckFloat64HoleAllowReturnHoleOperator;
@@ -326,8 +326,8 @@ struct SimplifiedOperatorGlobalCache final {
struct CheckTaggedHoleOperator final : public Operator1<CheckTaggedHoleMode> {
CheckTaggedHoleOperator()
: Operator1<CheckTaggedHoleMode>(IrOpcode::kCheckTaggedHole,
- Operator::kFoldable, "CheckTaggedHole",
- 1, 1, 1, 1, 1, 0, kMode) {}
+ Operator::kPure, "CheckTaggedHole", 1,
+ 1, 1, 1, 1, 0, kMode) {}
};
CheckTaggedHoleOperator<CheckTaggedHoleMode::kConvertHoleToUndefined>
kCheckTaggedHoleConvertHoleToUndefinedOperator;
@@ -336,8 +336,8 @@ struct SimplifiedOperatorGlobalCache final {
struct CheckIfOperator final : public Operator {
CheckIfOperator()
- : Operator(IrOpcode::kCheckIf, Operator::kFoldable, "CheckIf", 1, 1, 1,
- 0, 1, 0) {}
+ : Operator(IrOpcode::kCheckIf, Operator::kPure, "CheckIf", 1, 1, 1, 0,
+ 1, 0) {}
};
CheckIfOperator kCheckIf;
@@ -425,7 +425,7 @@ const Operator* SimplifiedOperatorBuilder::ReferenceEqual(Type* type) {
const Operator* SimplifiedOperatorBuilder::CheckBounds() {
// TODO(bmeurer): Cache this operator. Make it pure!
- return new (zone()) Operator(IrOpcode::kCheckBounds, Operator::kEliminatable,
+ return new (zone()) Operator(IrOpcode::kCheckBounds, Operator::kPure,
"CheckBounds", 2, 1, 1, 1, 1, 0);
}
@@ -486,14 +486,14 @@ const Operator* SimplifiedOperatorBuilder::StoreBuffer(BufferAccess access) {
const Operator* SimplifiedOperatorBuilder::SpeculativeNumberAdd(
BinaryOperationHints::Hint hint) {
return new (zone()) Operator1<BinaryOperationHints::Hint>(
- IrOpcode::kSpeculativeNumberAdd, Operator::kNoThrow,
- "SpeculativeNumberAdd", 2, 1, 1, 1, 1, 1, hint);
+ IrOpcode::kSpeculativeNumberAdd, Operator::kPure, "SpeculativeNumberAdd",
+ 2, 1, 1, 1, 1, 1, hint);
}
const Operator* SimplifiedOperatorBuilder::SpeculativeNumberSubtract(
BinaryOperationHints::Hint hint) {
return new (zone()) Operator1<BinaryOperationHints::Hint>(
- IrOpcode::kSpeculativeNumberSubtract, Operator::kNoThrow,
+ IrOpcode::kSpeculativeNumberSubtract, Operator::kPure,
"SpeculativeNumberSubtract", 2, 1, 1, 1, 1, 1, hint);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698