diff options
author | Andrew Trick <atrick@apple.com> | 2012-02-01 07:16:20 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2012-02-01 07:16:20 +0000 |
commit | 11e43291540db9d885b736cbd652558faab80955 (patch) | |
tree | 62c700cac3ae347b14f9ccdfed317193fcf0711d /include/llvm/PassManagers.h | |
parent | 19c51a9b3e544fc3bd34488f0c9c0c8a3df73a58 (diff) | |
download | llvm-11e43291540db9d885b736cbd652558faab80955.tar.gz llvm-11e43291540db9d885b736cbd652558faab80955.tar.bz2 llvm-11e43291540db9d885b736cbd652558faab80955.tar.xz |
Add pass printer passes in the right place.
The pass pointer should never be referenced after sending it to
schedulePass(), which may delete the pass. To fix this bug I had to
clean up the design leading to more goodness.
You may notice now that any non-analysis pass is printed. So things like loop-simplify and lcssa show up, while target lib, target data, alias analysis do not show up. Normally, analysis don't mutate the IR, but you can now check this by using both -print-after and -print-before. The effects of analysis will now show up in between the two.
The llc path is still in bad shape. But I'll be improving it in my next checkin. Meanwhile, print-machineinstrs still works the same way. With print-before/after, many llc passes that were not printed before now are, some of these should be converted to analysis. A few very important passes, isel and scheduler, are not properly initialized, so not printed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149480 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/PassManagers.h')
-rw-r--r-- | include/llvm/PassManagers.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/include/llvm/PassManagers.h b/include/llvm/PassManagers.h index 9afba2c256..fa29f50ccf 100644 --- a/include/llvm/PassManagers.h +++ b/include/llvm/PassManagers.h @@ -82,7 +82,7 @@ // relies on PassManagerImpl to do all the tasks. // // [o] class PassManagerImpl : public Pass, public PMDataManager, -// public PMDTopLevelManager +// public PMTopLevelManager // // PassManagerImpl is a top level pass manager responsible for managing // MPPassManagers. @@ -174,9 +174,8 @@ protected: void initializeAllAnalysisInfo(); private: - /// This is implemented by top level pass manager and used by - /// schedulePass() to add analysis info passes that are not available. - virtual void addTopLevelPass(Pass *P) = 0; + virtual PMDataManager *getAsPMDataManager() = 0; + virtual PassManagerType getTopLevelPassManagerType() = 0; public: /// Schedule pass P for execution. Make sure that passes required by |