This patch teaches the driver to pass -mgpopt by default to the backend when it
is supported, i.e. we are using -mno-abicalls.
Details
Details
- Reviewers
atanasyan slthakur - Commits
- rG31636a1fd956: Reland "[mips] Teach the driver to accept -m(no-)gpopt."
rGbadcc7e74bde: Reland "[mips] Teach the driver to accept -m(no-)gpopt."
rGe435e41e01b6: [mips] Teach the driver to accept -m(no-)gpopt.
rC308619: Reland "[mips] Teach the driver to accept -m(no-)gpopt."
rC308458: Reland "[mips] Teach the driver to accept -m(no-)gpopt."
rC308431: [mips] Teach the driver to accept -m(no-)gpopt.
rL308619: Reland "[mips] Teach the driver to accept -m(no-)gpopt."
rL308458: Reland "[mips] Teach the driver to accept -m(no-)gpopt."
rL308431: [mips] Teach the driver to accept -m(no-)gpopt.
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
| lib/Driver/ToolChains/Clang.cpp | ||
|---|---|---|
| 1490 ↗ | (On Diff #107070) | Could it be rewritten a bit shorter? bool NoAbiCalls =
ABICalls && ABICalls->getOption().matches(options::OPT_mno_abicalls);
bool WantGPOpt = GPOpt && GPOpt->getOption().matches(options::OPT_mgpopt);
if (NoAbiCalls && (!GPOpt || WantGPOpt)) {
CmdArgs.push_back("-mllvm");
CmdArgs.push_back("-mgpopt=1");
} else {
CmdArgs.push_back("-mllvm");
CmdArgs.push_back("-mgpopt=0");
}
if (GPOpt)
GPOpt->claim(); |
| lib/Driver/ToolChains/Clang.cpp | ||
|---|---|---|
| 1490 ↗ | (On Diff #107070) | Yes, it can. I think I mis-handled the case where -mabicalls and -mgpopt are combined. I'll reflow the logic along the lines of your suggestion and add a warning. |