llvm.org GIT mirror llvm / 99c2801
Create SampleProfileLoader pass in llvm instead of clang Summary: We used to create SampleProfileLoader pass in clang. This makes LTO/ThinLTO unable to add this pass in the linker plugin. This patch moves the SampleProfileLoader pass creation from clang to llvm pass manager builder. Reviewers: tejohnson, davidxl, dnovillo Subscribers: llvm-commits, mehdi_amini Differential Revision: https://reviews.llvm.org/D27743 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@289669 91177308-0d34-0410-b5e6-96231b3b80d8 Dehao Chen 2 years ago
2 changed file(s) with 7 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
148148 std::string PGOInstrGen;
149149 /// Path of the profile data file.
150150 std::string PGOInstrUse;
151 /// Path of the sample Profile data file.
152 std::string PGOSampleUse;
152154 private:
153155 /// ExtensionList - This is list of all of the extensions that are registered.
383383 void PassManagerBuilder::populateModulePassManager(
384384 legacy::PassManagerBase &MPM) {
385 if (!PGOSampleUse.empty()) {
386 MPM.add(createPruneEHPass());
387 MPM.add(createSampleProfileLoaderPass(PGOSampleUse));
388 }
385390 // Allow forcing function attributes as a debugging and tuning aid.
386391 MPM.add(createForceFunctionAttrsLegacyPass());