blob: e9ae9bc9db9f0e851bfbb3ac2eaabd1298d37f5a [file] [log] [blame]
// 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_CONTROL_REDUCER_H_
#define V8_COMPILER_CONTROL_REDUCER_H_
namespace v8 {
namespace internal {
namespace compiler {
class JSGraph;
class CommonOperatorBuilder;
class ControlReducer {
public:
// Perform branch folding and dead code elimination on the graph.
static void ReduceGraph(Zone* zone, JSGraph* graph,
CommonOperatorBuilder* builder);
// Trim nodes in the graph that are not reachable from end.
static void TrimGraph(Zone* zone, JSGraph* graph);
};
}
}
} // namespace v8::internal::compiler
#endif // V8_COMPILER_CONTROL_REDUCER_H_