Please use GitHub pull requests for new patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
llvm/lib/LTO/ThinLTOCodeGenerator.cpp
Show First 20 Lines • Show All 239 Lines • ▼ Show 20 Lines | static void optimizeModule(Module &TheModule, TargetMachine &TM, | ||||
std::optional<PGOOptions> PGOOpt; | std::optional<PGOOptions> PGOOpt; | ||||
LoopAnalysisManager LAM; | LoopAnalysisManager LAM; | ||||
FunctionAnalysisManager FAM; | FunctionAnalysisManager FAM; | ||||
CGSCCAnalysisManager CGAM; | CGSCCAnalysisManager CGAM; | ||||
ModuleAnalysisManager MAM; | ModuleAnalysisManager MAM; | ||||
PassInstrumentationCallbacks PIC; | PassInstrumentationCallbacks PIC; | ||||
StandardInstrumentations SI(TheModule.getContext(), DebugPassManager); | StandardInstrumentations SI(TheModule.getContext(), DebugPassManager); | ||||
SI.registerCallbacks(PIC, &FAM); | SI.registerCallbacks(PIC, &MAM); | ||||
PipelineTuningOptions PTO; | PipelineTuningOptions PTO; | ||||
PTO.LoopVectorization = true; | PTO.LoopVectorization = true; | ||||
PTO.SLPVectorization = true; | PTO.SLPVectorization = true; | ||||
PassBuilder PB(&TM, PTO, PGOOpt, &PIC); | PassBuilder PB(&TM, PTO, PGOOpt, &PIC); | ||||
std::unique_ptr<TargetLibraryInfoImpl> TLII( | std::unique_ptr<TargetLibraryInfoImpl> TLII( | ||||
new TargetLibraryInfoImpl(Triple(TM.getTargetTriple()))); | new TargetLibraryInfoImpl(Triple(TM.getTargetTriple()))); | ||||
if (Freestanding) | if (Freestanding) | ||||
▲ Show 20 Lines • Show All 970 Lines • Show Last 20 Lines |