1 // Copyright 2016 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_CHECKPOINT_ELIMINATION_H_ 6 #define V8_COMPILER_CHECKPOINT_ELIMINATION_H_ 7 8 #include "src/base/compiler-specific.h" 9 #include "src/compiler/graph-reducer.h" 10 #include "src/globals.h" 11 12 namespace v8 { 13 namespace internal { 14 namespace compiler { 15 16 // Performs elimination of redundant checkpoints within the graph. 17 class V8_EXPORT_PRIVATE CheckpointElimination final 18 : public NON_EXPORTED_BASE(AdvancedReducer) { 19 public: 20 explicit CheckpointElimination(Editor* editor); 21 ~CheckpointElimination() final {} 22 23 Reduction Reduce(Node* node) final; 24 25 private: 26 Reduction ReduceCheckpoint(Node* node); 27 }; 28 29 } // namespace compiler 30 } // namespace internal 31 } // namespace v8 32 33 #endif // V8_COMPILER_CHECKPOINT_ELIMINATION_H_ 34