Home | History | Annotate | Download | only in compiler
      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 "src/compiler/graph-reducer.h"
      9 
     10 namespace v8 {
     11 namespace internal {
     12 namespace compiler {
     13 
     14 // Forward declarations.
     15 class CommonOperatorBuilder;
     16 class Graph;
     17 
     18 
     19 // Lowers Select nodes to diamonds.
     20 class SelectLowering final : public Reducer {
     21  public:
     22   SelectLowering(Graph* graph, CommonOperatorBuilder* common);
     23   ~SelectLowering();
     24 
     25   Reduction Reduce(Node* node) override;
     26 
     27  private:
     28   CommonOperatorBuilder* common() const { return common_; }
     29   Graph* graph() const { return graph_; }
     30 
     31   CommonOperatorBuilder* common_;
     32   Graph* graph_;
     33 };
     34 
     35 }  // namespace compiler
     36 }  // namespace internal
     37 }  // namespace v8
     38 
     39 #endif  // V8_COMPILER_SELECT_LOWERING_H_
     40