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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits