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

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

Issue 479163002: [turbofan] Add new ControlEffect and Finish operators. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: 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/opcodes.h ('k') | src/compiler/typer.cc » ('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 42833fdeb417027543f0ed87ff293663d2b2c259..7830c1a1077099b290acaa1e8b2032b15e22193f 100644
--- a/src/compiler/operator-properties-inl.h
+++ b/src/compiler/operator-properties-inl.h
@@ -42,7 +42,8 @@ inline int OperatorProperties::GetContextInputCount(Operator* op) {
}
inline int OperatorProperties::GetEffectInputCount(Operator* op) {
- if (op->opcode() == IrOpcode::kEffectPhi) {
+ if (op->opcode() == IrOpcode::kEffectPhi ||
+ op->opcode() == IrOpcode::kFinish) {
return static_cast<Operator1<int>*>(op)->parameter();
}
if (op->HasProperty(Operator::kNoRead) && op->HasProperty(Operator::kNoWrite))
@@ -54,6 +55,7 @@ inline int OperatorProperties::GetControlInputCount(Operator* op) {
switch (op->opcode()) {
case IrOpcode::kPhi:
case IrOpcode::kEffectPhi:
+ case IrOpcode::kControlEffect:
return 1;
#define OPCODE_CASE(x) case IrOpcode::k##x:
CONTROL_OP_LIST(OPCODE_CASE)
@@ -87,7 +89,9 @@ inline bool OperatorProperties::HasValueOutput(Operator* op) {
}
inline bool OperatorProperties::HasEffectOutput(Operator* op) {
- return op->opcode() == IrOpcode::kStart || GetEffectInputCount(op) > 0;
+ return op->opcode() == IrOpcode::kStart ||
+ op->opcode() == IrOpcode::kControlEffect ||
+ (op->opcode() != IrOpcode::kFinish && GetEffectInputCount(op) > 0);
}
inline bool OperatorProperties::HasControlOutput(Operator* op) {
« no previous file with comments | « src/compiler/opcodes.h ('k') | src/compiler/typer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698