1 //===- llvm/PassManager.h - Container for Passes -----------------*- C++ -*--=//
3 // This file defines the PassManager class. This class is used to hold,
4 // maintain, and optimize execution of Passes. The PassManager class ensures
5 // that analysis results are available before a pass runs, and that Pass's are
6 // destroyed when the PassManager is destroyed.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLVM_PASSMANAGER_H
11 #define LLVM_PASSMANAGER_H
15 template<class UnitType> class PassManagerT;
18 PassManagerT<Module> *PM; // This is a straightforward Pimpl class
23 /// add - Add a pass to the queue of passes to run. This passes ownership of
24 /// the Pass to the PassManager. When the PassManager is destroyed, the pass
25 /// will be destroyed as well, so there is no need to delete the pass. This
26 /// implies that all passes MUST be allocated with 'new'.
30 /// run - Execute all of the passes scheduled for execution. Keep track of
31 /// whether any of the functions modifies the program, and if so, return true.