llvm.org GIT mirror llvm / 3898809
[Polly][PM] Register polly passes with the opt tool for the new-pm path Summary: When polly is linked into the tools because of the LLVM_POLLY_LINK_INTO_TOOLS option being set, we need to register its passes with the PassBuilder. Because polly is linked in, we can directly call its callback registration method, which registers the appropriate callbacks with the new PM's PassBuilder. This essentially follows exactly the way it worked with the legacy PM. Reviewers: grosser, chandlerc, bollu Reviewed By: grosser Subscribers: pollydev, llvm-commits Differential Revision: https://reviews.llvm.org/D36273 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310043 91177308-0d34-0410-b5e6-96231b3b80d8 Philip Pfaffe 2 years ago
1 changed file(s) with 11 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
1717 #include "llvm/Analysis/AliasAnalysis.h"
1818 #include "llvm/Analysis/CGSCCPassManager.h"
1919 #include "llvm/Bitcode/BitcodeWriterPass.h"
20 #include "llvm/Config/config.h"
2021 #include "llvm/IR/Dominators.h"
2122 #include "llvm/IR/IRPrintingPasses.h"
2223 #include "llvm/IR/LLVMContext.h"
159160 });
160161 }
161162
163 #ifdef LINK_POLLY_INTO_TOOLS
164 namespace polly {
165 void RegisterPollyPasses(PassBuilder &);
166 }
167 #endif
168
162169 bool llvm::runPassPipeline(StringRef Arg0, Module &M, TargetMachine *TM,
163170 tool_output_file *Out,
164171 tool_output_file *ThinLTOLinkOut,
189196 PassBuilder PB(TM, P);
190197 registerEPCallbacks(PB, VerifyEachPass, DebugPM);
191198
199 #ifdef LINK_POLLY_INTO_TOOLS
200 polly::RegisterPollyPasses(PB);
201 #endif
202
192203 // Specially handle the alias analysis manager so that we can register
193204 // a custom pipeline of AA passes with it.
194205 AAManager AA;