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_DIAMOND_H_ | 5 #ifndef V8_COMPILER_DIAMOND_H_ |
6 #define V8_COMPILER_DIAMOND_H_ | 6 #define V8_COMPILER_DIAMOND_H_ |
7 | 7 |
8 #include "src/compiler/common-operator.h" | 8 #include "src/compiler/common-operator.h" |
9 #include "src/compiler/graph.h" | 9 #include "src/compiler/graph.h" |
10 #include "src/compiler/node.h" | 10 #include "src/compiler/node.h" |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 void Nest(Diamond& that, bool if_true) { | 42 void Nest(Diamond& that, bool if_true) { |
43 if (if_true) { | 43 if (if_true) { |
44 branch->ReplaceInput(1, that.if_true); | 44 branch->ReplaceInput(1, that.if_true); |
45 that.merge->ReplaceInput(0, merge); | 45 that.merge->ReplaceInput(0, merge); |
46 } else { | 46 } else { |
47 branch->ReplaceInput(1, that.if_false); | 47 branch->ReplaceInput(1, that.if_false); |
48 that.merge->ReplaceInput(1, merge); | 48 that.merge->ReplaceInput(1, merge); |
49 } | 49 } |
50 } | 50 } |
51 | 51 |
52 Node* Phi(MachineType machine_type, Node* tv, Node* fv) { | 52 Node* Phi(MachineRepresentation rep, Node* tv, Node* fv) { |
53 return graph->NewNode(common->Phi(machine_type, 2), tv, fv, merge); | 53 return graph->NewNode(common->Phi(rep, 2), tv, fv, merge); |
54 } | 54 } |
55 }; | 55 }; |
56 | 56 |
57 } // namespace compiler | 57 } // namespace compiler |
58 } // namespace internal | 58 } // namespace internal |
59 } // namespace v8 | 59 } // namespace v8 |
60 | 60 |
61 #endif // V8_COMPILER_DIAMOND_H_ | 61 #endif // V8_COMPILER_DIAMOND_H_ |
OLD | NEW |