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

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

Issue 665223006: Implement control reducer, which reduces branches and phis together in a single fixpoint. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 2 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/control-reducer.cc ('k') | src/compiler/scheduler.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 4d851716df43968ab64614515b5b7d8c5cf99539..4430a1295b59ac2b28695e607a9bf35a74241b61 100644
--- a/src/compiler/operator-properties-inl.h
+++ b/src/compiler/operator-properties-inl.h
@@ -114,6 +114,7 @@ inline int OperatorProperties::GetEffectInputCount(const Operator* op) {
}
inline int OperatorProperties::GetControlInputCount(const Operator* op) {
+ // TODO(titzer): fix this mess; just make them a count on the operator.
switch (op->opcode()) {
case IrOpcode::kPhi:
case IrOpcode::kEffectPhi:
@@ -124,8 +125,8 @@ inline int OperatorProperties::GetControlInputCount(const Operator* op) {
#define OPCODE_CASE(x) case IrOpcode::k##x:
CONTROL_OP_LIST(OPCODE_CASE)
#undef OPCODE_CASE
- // Branch operator is special
if (op->opcode() == IrOpcode::kBranch) return 1;
+ if (op->opcode() == IrOpcode::kTerminate) return 1;
// Control operators are Operator1<int>.
return OpParameter<int>(op);
default:
« no previous file with comments | « src/compiler/control-reducer.cc ('k') | src/compiler/scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698