verifier.h 865 Bytes
Newer Older
1 2 3 4 5 6 7
// Copyright 2014 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_VERIFIER_H_
#define V8_COMPILER_VERIFIER_H_

8
#include "src/base/macros.h"
9 10 11 12 13

namespace v8 {
namespace internal {
namespace compiler {

14 15 16 17 18
class Graph;
class Schedule;

// Verifies properties of a graph, such as the well-formedness of inputs to
// each node, etc.
19 20
class Verifier {
 public:
21 22 23
  enum Typing { TYPED, UNTYPED };

  static void Run(Graph* graph, Typing typing = TYPED);
24 25 26 27 28

 private:
  class Visitor;
  DISALLOW_COPY_AND_ASSIGN(Verifier);
};
29 30 31 32 33 34

// Verifies properties of a schedule, such as dominance, phi placement, etc.
class ScheduleVerifier {
 public:
  static void Run(Schedule* schedule);
};
35 36 37 38 39
}
}
}  // namespace v8::internal::compiler

#endif  // V8_COMPILER_VERIFIER_H_