// 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_EQUIVALENCE_H_ #define V8_COMPILER_CONTROL_EQUIVALENCE_H_ #include "src/base/compiler-specific.h" #include "src/common/globals.h" #include "src/compiler/graph.h" #include "src/compiler/node.h" #include "src/zone/zone-containers.h" namespace v8 { namespace internal { namespace compiler { // Determines control dependence equivalence classes for control nodes. Any two // nodes having the same set of control dependences land in one class. These // classes can in turn be used to: // - Build a program structure tree (PST) for controls in the graph. // - Determine single-entry single-exit (SESE) regions within the graph. // // Note that this implementation actually uses cycle equivalence to establish // class numbers. Any two nodes are cycle equivalent if they occur in the same // set of cycles. It can be shown that control dependence equivalence reduces // to undirected cycle equivalence for strongly connected control flow graphs. // // The algorithm is based on the paper, "The program structure tree: computing // control regions in linear time" by Johnson, Pearson & Pingali (PLDI94) which // also contains proofs for the aforementioned equivalence. References to line // numbers in the algorithm from figure 4 have been added [line:x]. class V8_EXPORT_PRIVATE ControlEquivalence final : public NON_EXPORTED_BASE(ZoneObject) { … }; } // namespace compiler } // namespace internal } // namespace v8 #endif // V8_COMPILER_CONTROL_EQUIVALENCE_H_