Reviewers: Michael Starzinger,
Description:
[turbofan] --turbo implies --turbo-type-feedback and disable fast
properties.
Note: can't be landed until LoadProperty => LoadNamed is fixed.
[email protected]
BUG=
Please review this at https://codereview.chromium.org/1101473004/
Base URL: https://chromium.googlesource.com/v8/v8.git@master
Affected files (+8, -0 lines):
M src/compiler/js-type-feedback.cc
M src/flag-definitions.h
Index: src/compiler/js-type-feedback.cc
diff --git a/src/compiler/js-type-feedback.cc
b/src/compiler/js-type-feedback.cc
index
d93dc5c11f3f38aa4b6fe71a0b541003058e3a81..a2ffa0bfa7993400ea79391d730610c984985c54
100644
--- a/src/compiler/js-type-feedback.cc
+++ b/src/compiler/js-type-feedback.cc
@@ -14,6 +14,7 @@
#include "src/compiler/common-operator.h"
#include "src/compiler/node-aux-data.h"
#include "src/compiler/node-matchers.h"
+#include "src/compiler/operator-properties.h"
#include "src/compiler/simplified-operator.h"
namespace v8 {
@@ -22,6 +23,8 @@ namespace compiler {
enum LoadOrStore { LOAD, STORE };
+#define EAGER_DEOPT_LOCATIONS_FOR_PROPERTY_ACCESS_ARE_CORRECT false
+
JSTypeFeedbackTable::JSTypeFeedbackTable(Zone* zone)
: map_(TypeFeedbackIdMap::key_compare(),
TypeFeedbackIdMap::allocator_type(zone)) {}
@@ -140,6 +143,8 @@ Reduction
JSTypeFeedbackSpecializer::ReduceJSLoadNamed(Node* node) {
DCHECK(node->opcode() == IrOpcode::kJSLoadNamed);
// TODO(turbofan): type feedback currently requires deoptimization.
if (!FLAG_turbo_deoptimization) return NoChange();
+ // TODO(titzer): deopt locations are wrong for property accesses
+ if (!EAGER_DEOPT_LOCATIONS_FOR_PROPERTY_ACCESS_ARE_CORRECT) return
NoChange();
// TODO(turbofan): handle vector-based type feedback.
TypeFeedbackId id = js_type_feedback_->find(node);
@@ -192,6 +197,8 @@ Reduction
JSTypeFeedbackSpecializer::ReduceJSStoreNamed(Node* node) {
DCHECK(node->opcode() == IrOpcode::kJSStoreNamed);
// TODO(turbofan): type feedback currently requires deoptimization.
if (!FLAG_turbo_deoptimization) return NoChange();
+ // TODO(titzer): deopt locations are wrong for property accesses
+ if (!EAGER_DEOPT_LOCATIONS_FOR_PROPERTY_ACCESS_ARE_CORRECT) return
NoChange();
TypeFeedbackId id = js_type_feedback_->find(node);
if (id.IsNone() || oracle()->StoreIsUninitialized(id)) return NoChange();
Index: src/flag-definitions.h
diff --git a/src/flag-definitions.h b/src/flag-definitions.h
index
dd948716bae82a623473be7d0e96e56024a55f85..d43155b0f337b1ddc4ba887bcb5ec7744cbc5688
100644
--- a/src/flag-definitions.h
+++ b/src/flag-definitions.h
@@ -382,6 +382,7 @@ DEFINE_BOOL(omit_map_checks_for_leaf_maps, true,
// Flags for TurboFan.
DEFINE_BOOL(turbo, false, "enable TurboFan compiler")
DEFINE_IMPLICATION(turbo, turbo_deoptimization)
+DEFINE_IMPLICATION(turbo, turbo_type_feedback)
DEFINE_STRING(turbo_filter, "~~", "optimization filter for TurboFan
compiler")
DEFINE_BOOL(trace_turbo, false, "trace generated TurboFan IR")
DEFINE_BOOL(trace_turbo_graph, false, "trace generated TurboFan graphs")
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.