[PATCH] D34728: [ThinkLTO] Invoke build(Thin)?LTOPreLinkDefaultPipeline.
Chandler Carruth via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jun 27 17:15:43 PDT 2017
chandlerc added inline comments.
================
Comment at: clang/lib/CodeGen/BackendUtil.cpp:804-807
+ case 0:
+ return PassBuilder::O0;
+
case 1:
----------------
Why is this change needed?
================
Comment at: clang/lib/CodeGen/BackendUtil.cpp:885-886
if (CodeGenOpts.OptimizationLevel == 0) {
- // Build a minimal pipeline based on the semantics required by Clang,
- // which is just that always inlining occurs.
MPM.addPass(AlwaysInlinerPass());
----------------
Keep this comment?
================
Comment at: clang/lib/CodeGen/BackendUtil.cpp:893-894
MPM.addPass(AlwaysInlinerPass());
+ if (IsThinLTO)
+ MPM.addPass(NameAnonGlobalPass());
} else {
----------------
Why not a single addition of this pass at the end and a comment explaining taht regardless of optimization level this is required for ThinLTO?
https://reviews.llvm.org/D34728
More information about the cfe-commits
mailing list