checkpoint-elimination.h 1000 Bytes
Newer Older
1 2 3 4 5 6 7
// Copyright 2016 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef V8_COMPILER_CHECKPOINT_ELIMINATION_H_
#define V8_COMPILER_CHECKPOINT_ELIMINATION_H_

8
#include "src/base/compiler-specific.h"
9
#include "src/common/globals.h"
10 11 12 13 14 15 16
#include "src/compiler/graph-reducer.h"

namespace v8 {
namespace internal {
namespace compiler {

// Performs elimination of redundant checkpoints within the graph.
17 18
class V8_EXPORT_PRIVATE CheckpointElimination final
    : public NON_EXPORTED_BASE(AdvancedReducer) {
19 20
 public:
  explicit CheckpointElimination(Editor* editor);
21
  ~CheckpointElimination() final = default;
22

23 24
  const char* reducer_name() const override { return "CheckpointElimination"; }

25
  Reduction Reduce(Node* node) final;
26 27 28

 private:
  Reduction ReduceCheckpoint(Node* node);
29 30 31 32 33 34 35
};

}  // namespace compiler
}  // namespace internal
}  // namespace v8

#endif  // V8_COMPILER_CHECKPOINT_ELIMINATION_H_