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

Unified Diff: src/compiler/operator-properties-inl.h

Issue 522873002: Removal of the deoptimization block from Turbofan (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Change constant capitalization Created 6 years, 4 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/operator-properties.h ('k') | src/compiler/raw-machine-assembler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/operator-properties-inl.h
diff --git a/src/compiler/operator-properties-inl.h b/src/compiler/operator-properties-inl.h
index 9d8cc0424e05f9be54c4f5654490b66e9a9fba06..374d9ba55cbcc7fd2ee36dca0e9c86b0d846f7fd 100644
--- a/src/compiler/operator-properties-inl.h
+++ b/src/compiler/operator-properties-inl.h
@@ -38,6 +38,7 @@ inline bool OperatorProperties::HasFrameStateInput(Operator* op) {
switch (op->opcode()) {
case IrOpcode::kJSCallFunction:
+ case IrOpcode::kJSCallConstruct:
return true;
case IrOpcode::kJSCallRuntime: {
Runtime::FunctionId function =
@@ -57,6 +58,24 @@ inline bool OperatorProperties::HasFrameStateInput(Operator* op) {
UNREACHABLE();
}
+ // Binary operations
+ case IrOpcode::kJSBitwiseOr:
+ case IrOpcode::kJSBitwiseXor:
+ case IrOpcode::kJSBitwiseAnd:
+ case IrOpcode::kJSShiftLeft:
+ case IrOpcode::kJSShiftRight:
+ case IrOpcode::kJSShiftRightLogical:
+ case IrOpcode::kJSAdd:
+ case IrOpcode::kJSSubtract:
+ case IrOpcode::kJSMultiply:
+ case IrOpcode::kJSDivide:
+ case IrOpcode::kJSModulus:
+ case IrOpcode::kJSLoadProperty:
+ case IrOpcode::kJSStoreProperty:
+ case IrOpcode::kJSLoadNamed:
+ case IrOpcode::kJSStoreNamed:
+ return true;
+
default:
return false;
}
@@ -95,10 +114,6 @@ inline int OperatorProperties::GetControlInputCount(Operator* op) {
#undef OPCODE_CASE
return static_cast<ControlOperator*>(op)->ControlInputCount();
default:
- // If a node can lazily deoptimize, it needs control dependency.
- if (CanLazilyDeoptimize(op)) {
- return 1;
- }
// Operators that have write effects must have a control
// dependency. Effect dependencies only ensure the correct order of
// write/read operations without consideration of control flow. Without an
@@ -131,8 +146,7 @@ inline bool OperatorProperties::HasEffectOutput(Operator* op) {
inline bool OperatorProperties::HasControlOutput(Operator* op) {
IrOpcode::Value opcode = static_cast<IrOpcode::Value>(op->opcode());
- return (opcode != IrOpcode::kEnd && IrOpcode::IsControlOpcode(opcode)) ||
- CanLazilyDeoptimize(op);
+ return (opcode != IrOpcode::kEnd && IrOpcode::IsControlOpcode(opcode));
}
@@ -158,66 +172,6 @@ inline bool OperatorProperties::IsBasicBlockBegin(Operator* op) {
opcode == IrOpcode::kIfFalse;
}
-inline bool OperatorProperties::CanLazilyDeoptimize(Operator* op) {
- // TODO(jarin) This function allows turning on lazy deoptimization
- // incrementally. It will change as we turn on lazy deopt for
- // more nodes.
-
- if (!FLAG_turbo_deoptimization) {
- return false;
- }
-
- switch (op->opcode()) {
- case IrOpcode::kCall: {
- CallOperator* call_op = reinterpret_cast<CallOperator*>(op);
- CallDescriptor* descriptor = call_op->parameter();
- return descriptor->CanLazilyDeoptimize();
- }
- case IrOpcode::kJSCallRuntime: {
- Runtime::FunctionId function =
- reinterpret_cast<Operator1<Runtime::FunctionId>*>(op)->parameter();
- // TODO(jarin) At the moment, we only support lazy deoptimization for
- // a few chosen runtime functions.
- switch (function) {
- case Runtime::kDebugBreak:
- case Runtime::kDeoptimizeFunction:
- case Runtime::kSetScriptBreakPoint:
- case Runtime::kDebugGetLoadedScripts:
- case Runtime::kStackGuard:
- return true;
- default:
- return false;
- }
- UNREACHABLE();
- }
-
- // JS function calls
- case IrOpcode::kJSCallFunction:
- case IrOpcode::kJSCallConstruct:
-
- // Binary operations
- case IrOpcode::kJSBitwiseOr:
- case IrOpcode::kJSBitwiseXor:
- case IrOpcode::kJSBitwiseAnd:
- case IrOpcode::kJSShiftLeft:
- case IrOpcode::kJSShiftRight:
- case IrOpcode::kJSShiftRightLogical:
- case IrOpcode::kJSAdd:
- case IrOpcode::kJSSubtract:
- case IrOpcode::kJSMultiply:
- case IrOpcode::kJSDivide:
- case IrOpcode::kJSModulus:
- case IrOpcode::kJSLoadProperty:
- case IrOpcode::kJSStoreProperty:
- case IrOpcode::kJSLoadNamed:
- case IrOpcode::kJSStoreNamed:
- return true;
-
- default:
- return false;
- }
- return false;
-}
}
}
} // namespace v8::internal::compiler
« no previous file with comments | « src/compiler/operator-properties.h ('k') | src/compiler/raw-machine-assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698