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

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

Issue 2082523002: [turbofan] Introduce CheckTaggedSigned and CheckTaggedPointer operators. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix compile 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 | « src/compiler/common-operator.h ('k') | src/compiler/effect-control-linearizer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/common-operator.cc
diff --git a/src/compiler/common-operator.cc b/src/compiler/common-operator.cc
index 00bcb727ef27b5f9e9dec76214239a9ae87b371f..96a8d54964461ed17f82ed0631bee6d84e060a29 100644
--- a/src/compiler/common-operator.cc
+++ b/src/compiler/common-operator.cc
@@ -167,6 +167,26 @@ std::ostream& operator<<(std::ostream& os,
return os << p.value() << "|" << p.rmode() << "|" << p.type();
}
+size_t hash_value(RegionObservability observability) {
+ return static_cast<size_t>(observability);
+}
+
+std::ostream& operator<<(std::ostream& os, RegionObservability observability) {
+ switch (observability) {
+ case RegionObservability::kObservable:
+ return os << "observable";
+ case RegionObservability::kNotObservable:
+ return os << "not-observable";
+ }
+ UNREACHABLE();
+ return os;
+}
+
+RegionObservability RegionObservabilityOf(Operator const* op) {
+ DCHECK_EQ(IrOpcode::kBeginRegion, op->opcode());
+ return OpParameter<RegionObservability>(op);
+}
+
std::ostream& operator<<(std::ostream& os,
const ZoneVector<MachineType>* types) {
// Print all the MachineTypes, separated by commas.
@@ -194,8 +214,7 @@ std::ostream& operator<<(std::ostream& os,
V(OsrNormalEntry, Operator::kFoldable, 0, 1, 1, 0, 1, 1) \
V(OsrLoopEntry, Operator::kFoldable, 0, 1, 1, 0, 1, 1) \
V(Checkpoint, Operator::kKontrol, 0, 1, 1, 0, 1, 0) \
- V(BeginRegion, Operator::kNoThrow, 0, 1, 0, 0, 1, 0) \
- V(FinishRegion, Operator::kNoThrow, 1, 1, 0, 1, 1, 0)
+ V(FinishRegion, Operator::kKontrol, 1, 1, 0, 1, 1, 0)
#define CACHED_RETURN_LIST(V) \
V(1) \
@@ -374,6 +393,20 @@ struct CommonOperatorGlobalCache final {
CACHED_EFFECT_PHI_LIST(CACHED_EFFECT_PHI)
#undef CACHED_EFFECT_PHI
+ template <RegionObservability kRegionObservability>
+ struct BeginRegionOperator final : public Operator1<RegionObservability> {
+ BeginRegionOperator()
+ : Operator1<RegionObservability>( // --
+ IrOpcode::kBeginRegion, Operator::kKontrol, // opcode
+ "BeginRegion", // name
+ 0, 1, 0, 0, 1, 0, // counts
+ kRegionObservability) {} // parameter
+ };
+ BeginRegionOperator<RegionObservability::kObservable>
+ kBeginRegionObservableOperator;
+ BeginRegionOperator<RegionObservability::kNotObservable>
+ kBeginRegionNotObservableOperator;
+
template <size_t kInputCount>
struct LoopOperator final : public Operator {
LoopOperator()
@@ -773,6 +806,17 @@ const Operator* CommonOperatorBuilder::EffectPhi(int effect_input_count) {
0, effect_input_count, 1, 0, 1, 0); // counts
}
+const Operator* CommonOperatorBuilder::BeginRegion(
+ RegionObservability region_observability) {
+ switch (region_observability) {
+ case RegionObservability::kObservable:
+ return &cache_.kBeginRegionObservableOperator;
+ case RegionObservability::kNotObservable:
+ return &cache_.kBeginRegionNotObservableOperator;
+ }
+ UNREACHABLE();
+ return nullptr;
+}
const Operator* CommonOperatorBuilder::StateValues(int arguments) {
switch (arguments) {
« no previous file with comments | « src/compiler/common-operator.h ('k') | src/compiler/effect-control-linearizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698