| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_COMPILER_OPERATOR_PROPERTIES_INL_H_ | 5 #ifndef V8_COMPILER_OPERATOR_PROPERTIES_INL_H_ |
| 6 #define V8_COMPILER_OPERATOR_PROPERTIES_INL_H_ | 6 #define V8_COMPILER_OPERATOR_PROPERTIES_INL_H_ |
| 7 | 7 |
| 8 #include "src/v8.h" | 8 #include "src/v8.h" |
| 9 | 9 |
| 10 #include "src/compiler/js-operator.h" | 10 #include "src/compiler/js-operator.h" |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 | 116 |
| 117 | 117 |
| 118 inline bool OperatorProperties::IsBasicBlockBegin(Operator* op) { | 118 inline bool OperatorProperties::IsBasicBlockBegin(Operator* op) { |
| 119 uint8_t opcode = op->opcode(); | 119 uint8_t opcode = op->opcode(); |
| 120 return opcode == IrOpcode::kStart || opcode == IrOpcode::kEnd || | 120 return opcode == IrOpcode::kStart || opcode == IrOpcode::kEnd || |
| 121 opcode == IrOpcode::kDead || opcode == IrOpcode::kLoop || | 121 opcode == IrOpcode::kDead || opcode == IrOpcode::kLoop || |
| 122 opcode == IrOpcode::kMerge || opcode == IrOpcode::kIfTrue || | 122 opcode == IrOpcode::kMerge || opcode == IrOpcode::kIfTrue || |
| 123 opcode == IrOpcode::kIfFalse; | 123 opcode == IrOpcode::kIfFalse; |
| 124 } | 124 } |
| 125 | 125 |
| 126 inline bool OperatorProperties::CanBeScheduled(Operator* op) { return true; } | |
| 127 | |
| 128 inline bool OperatorProperties::HasFixedSchedulePosition(Operator* op) { | |
| 129 IrOpcode::Value opcode = static_cast<IrOpcode::Value>(op->opcode()); | |
| 130 return (IrOpcode::IsControlOpcode(opcode)) || | |
| 131 opcode == IrOpcode::kParameter || opcode == IrOpcode::kEffectPhi || | |
| 132 opcode == IrOpcode::kPhi; | |
| 133 } | |
| 134 | |
| 135 inline bool OperatorProperties::IsScheduleRoot(Operator* op) { | |
| 136 uint8_t opcode = op->opcode(); | |
| 137 return opcode == IrOpcode::kEnd || opcode == IrOpcode::kEffectPhi || | |
| 138 opcode == IrOpcode::kPhi; | |
| 139 } | |
| 140 | |
| 141 inline bool OperatorProperties::CanLazilyDeoptimize(Operator* op) { | 126 inline bool OperatorProperties::CanLazilyDeoptimize(Operator* op) { |
| 142 // TODO(jarin) This function allows turning on lazy deoptimization | 127 // TODO(jarin) This function allows turning on lazy deoptimization |
| 143 // incrementally. It will change as we turn on lazy deopt for | 128 // incrementally. It will change as we turn on lazy deopt for |
| 144 // more nodes. | 129 // more nodes. |
| 145 | 130 |
| 146 if (!FLAG_turbo_deoptimization) { | 131 if (!FLAG_turbo_deoptimization) { |
| 147 return false; | 132 return false; |
| 148 } | 133 } |
| 149 | 134 |
| 150 switch (op->opcode()) { | 135 switch (op->opcode()) { |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 default: | 171 default: |
| 187 return false; | 172 return false; |
| 188 } | 173 } |
| 189 return false; | 174 return false; |
| 190 } | 175 } |
| 191 } | 176 } |
| 192 } | 177 } |
| 193 } // namespace v8::internal::compiler | 178 } // namespace v8::internal::compiler |
| 194 | 179 |
| 195 #endif // V8_COMPILER_OPERATOR_PROPERTIES_INL_H_ | 180 #endif // V8_COMPILER_OPERATOR_PROPERTIES_INL_H_ |
| OLD | NEW |