Mercurial > hg > CbC > CbC_llvm
comparison include/llvm/IR/LegacyPassManager.h @ 83:60c9769439b8 LLVM3.7
LLVM 3.7
author | Tatsuki IHA <e125716@ie.u-ryukyu.ac.jp> |
---|---|
date | Wed, 18 Feb 2015 14:55:36 +0900 |
parents | 54457678186b |
children | afa8332a0e37 |
comparison
equal
deleted
inserted
replaced
78:af83660cff7b | 83:60c9769439b8 |
---|---|
35 /// it is. | 35 /// it is. |
36 class PassManagerBase { | 36 class PassManagerBase { |
37 public: | 37 public: |
38 virtual ~PassManagerBase(); | 38 virtual ~PassManagerBase(); |
39 | 39 |
40 /// add - Add a pass to the queue of passes to run. This passes ownership of | 40 /// Add a pass to the queue of passes to run. This passes ownership of |
41 /// the Pass to the PassManager. When the PassManager is destroyed, the pass | 41 /// the Pass to the PassManager. When the PassManager is destroyed, the pass |
42 /// will be destroyed as well, so there is no need to delete the pass. This | 42 /// will be destroyed as well, so there is no need to delete the pass. This |
43 /// may even destroy the pass right away if it is found to be redundant. This | |
43 /// implies that all passes MUST be allocated with 'new'. | 44 /// implies that all passes MUST be allocated with 'new'. |
44 virtual void add(Pass *P) = 0; | 45 virtual void add(Pass *P) = 0; |
45 }; | 46 }; |
46 | 47 |
47 /// PassManager manages ModulePassManagers | 48 /// PassManager manages ModulePassManagers |
49 public: | 50 public: |
50 | 51 |
51 PassManager(); | 52 PassManager(); |
52 ~PassManager(); | 53 ~PassManager(); |
53 | 54 |
54 /// add - Add a pass to the queue of passes to run. This passes ownership of | |
55 /// the Pass to the PassManager. When the PassManager is destroyed, the pass | |
56 /// will be destroyed as well, so there is no need to delete the pass. This | |
57 /// implies that all passes MUST be allocated with 'new'. | |
58 void add(Pass *P) override; | 55 void add(Pass *P) override; |
59 | 56 |
60 /// run - Execute all of the passes scheduled for execution. Keep track of | 57 /// run - Execute all of the passes scheduled for execution. Keep track of |
61 /// whether any of the passes modifies the module, and if so, return true. | 58 /// whether any of the passes modifies the module, and if so, return true. |
62 bool run(Module &M); | 59 bool run(Module &M); |
73 /// FunctionPassManager ctor - This initializes the pass manager. It needs, | 70 /// FunctionPassManager ctor - This initializes the pass manager. It needs, |
74 /// but does not take ownership of, the specified Module. | 71 /// but does not take ownership of, the specified Module. |
75 explicit FunctionPassManager(Module *M); | 72 explicit FunctionPassManager(Module *M); |
76 ~FunctionPassManager(); | 73 ~FunctionPassManager(); |
77 | 74 |
78 /// add - Add a pass to the queue of passes to run. This passes | |
79 /// ownership of the Pass to the PassManager. When the | |
80 /// PassManager_X is destroyed, the pass will be destroyed as well, so | |
81 /// there is no need to delete the pass. | |
82 /// This implies that all passes MUST be allocated with 'new'. | |
83 void add(Pass *P) override; | 75 void add(Pass *P) override; |
84 | 76 |
85 /// run - Execute all of the passes scheduled for execution. Keep | 77 /// run - Execute all of the passes scheduled for execution. Keep |
86 /// track of whether any of the passes modifies the function, and if | 78 /// track of whether any of the passes modifies the function, and if |
87 /// so, return true. | 79 /// so, return true. |