[PATCH] D85810: [clang] Pass-through remarks options to lld

2020-08-17 Thread Wei Wang via Phabricator via cfe-commits
weiwang updated this revision to Diff 286124. weiwang added a comment. Herald added subscribers: dang, arichardson, emaste. Herald added a reviewer: espindola. update: 1. add `--plugin-opt` alias for remarks in lld 2. handle both lld and ld.gold pass-through 3. simplify target checking logic 4. c

[PATCH] D85810: [clang] Pass-through remarks options to lld

2020-08-14 Thread Teresa Johnson via Phabricator via cfe-commits
tejohnson added inline comments. Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:71 + + bool isLLD = llvm::sys::path::filename(LinkerPath) == "ld.lld" || + llvm::sys::path::stem(LinkerPath) != "ld.lld"; MaskRay wrote: > Checking the path is

[PATCH] D85810: [clang] Pass-through remarks options to lld

2020-08-13 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:81 +CmdArgs.push_back("-mllvm"); +std::string Passes = std::string("-pass-remarks=") + A->getValue(); +CmdArgs.push_back(Args.MakeArgString(Passes)); Delete such one

[PATCH] D85810: [clang] Pass-through remarks options to lld

2020-08-13 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:71 + + bool isLLD = llvm::sys::path::filename(LinkerPath) == "ld.lld" || + llvm::sys::path::stem(LinkerPath) != "ld.lld"; Checking the path is brittle. Consider

[PATCH] D85810: [clang] Pass-through remarks options to lld

2020-08-12 Thread Wei Wang via Phabricator via cfe-commits
weiwang updated this revision to Diff 285205. weiwang added a comment. update test case Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D85810/new/ https://reviews.llvm.org/D85810 Files: clang/include/clang/Driver/Driver.h clang/lib/Driver/Driver

[PATCH] D85810: [clang] Pass-through remarks options to lld

2020-08-11 Thread Wei Wang via Phabricator via cfe-commits
weiwang added reviewers: wenlei, hoyFB. weiwang added a comment. This is the the 2nd of 3 dependent patches: 1. [lld] Enable remarks hotness filtering in lld: https://reviews.llvm.org/D85809 2. [clang] Pass-through remarks options to lld: https://reviews.llvm.org/D85810 3. [remarks] Optimization

[PATCH] D85810: [clang] Pass-through remarks options to lld

2020-08-11 Thread Wei Wang via Phabricator via cfe-commits
weiwang created this revision. Herald added subscribers: cfe-commits, dexonsmith. Herald added a project: clang. weiwang requested review of this revision. Propagate driver commandline remarks options to link. Pass-through happens when: 1. LTO is enabled; 2. Single arch target is specified; 3. Th