OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef V8_COMPILER_SELECT_LOWERING_H_ |
| 6 #define V8_COMPILER_SELECT_LOWERING_H_ |
| 7 |
| 8 #include <map> |
| 9 |
| 10 #include "src/compiler/graph-reducer.h" |
| 11 #include "src/zone-allocator.h" |
| 12 |
| 13 namespace v8 { |
| 14 namespace internal { |
| 15 namespace compiler { |
| 16 |
| 17 // Forward declarations. |
| 18 class CommonOperatorBuilder; |
| 19 class Graph; |
| 20 |
| 21 |
| 22 // Lowers Select nodes to diamonds. |
| 23 class SelectLowering FINAL : public Reducer { |
| 24 public: |
| 25 SelectLowering(Graph* graph, CommonOperatorBuilder* common); |
| 26 ~SelectLowering(); |
| 27 |
| 28 Reduction Reduce(Node* node) OVERRIDE; |
| 29 |
| 30 private: |
| 31 typedef std::map<Node*, Node*, std::less<Node*>, |
| 32 zone_allocator<std::pair<Node* const, Node*>>> Merges; |
| 33 |
| 34 CommonOperatorBuilder* common() const { return common_; } |
| 35 Graph* graph() const { return graph_; } |
| 36 |
| 37 CommonOperatorBuilder* common_; |
| 38 Graph* graph_; |
| 39 Merges merges_; |
| 40 }; |
| 41 |
| 42 } // namespace compiler |
| 43 } // namespace internal |
| 44 } // namespace v8 |
| 45 |
| 46 #endif // V8_COMPILER_SELECT_LOWERING_H_ |
OLD | NEW |