//===- CallGraphSCCPass.h - Pass that operates BU on call graph -*- C++ -*-===// // // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// // // This file defines the CallGraphSCCPass class, which is used for passes which // are implemented as bottom-up traversals on the call graph. Because there may // be cycles in the call graph, passes of this type operate on the call-graph in // SCC order: that is, they process function bottom-up, except for recursive // functions, which they process all at once. // // These passes are inherently interprocedural, and are required to keep the // call graph up-to-date if they do anything which could modify it. // //===----------------------------------------------------------------------===// #ifndef LLVM_ANALYSIS_CALLGRAPHSCCPASS_H #define LLVM_ANALYSIS_CALLGRAPHSCCPASS_H #include "llvm/ADT/ArrayRef.h" #include "llvm/Pass.h" #include <vector> namespace llvm { class CallGraph; class CallGraphNode; class CallGraphSCC; class PMStack; class CallGraphSCCPass : public Pass { … }; /// CallGraphSCC - This is a single SCC that a CallGraphSCCPass is run on. class CallGraphSCC { … }; void initializeDummyCGSCCPassPass(PassRegistry &); /// This pass is required by interprocedural register allocation. It forces /// codegen to follow bottom up order on call graph. class DummyCGSCCPass : public CallGraphSCCPass { … }; } // end namespace llvm #endif // LLVM_ANALYSIS_CALLGRAPHSCCPASS_H