[PATCH] D68049: Propeller: Clang options for basic block sections
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 26 05:13:02 PDT 2019
MaskRay added inline comments.
================
Comment at: clang/lib/CodeGen/BackendUtil.cpp:439
+ // Empty '!' implies no more functions.
+ if (S.size() == 1 && S[0] == '!')
+ break;
----------------
```
if (S.consume_front("!")) {
if (S.empty())
...
else
...
}
```
================
Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:631
+ if (A->getOption().matches(options::OPT_fpropeller_optimize_EQ)) {
+ if (!Args.getLastArgValue(options::OPT_fuse_ld_EQ).equals_lower("lld"))
+ D.Diag(clang::diag::err_drv_unsupported_opt)
----------------
This check is overly constrained. Some systems default to use lld (e.g. installed at /usr/bin/ld). I suggest removing this check.
================
Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:640
+ CmdArgs.push_back("--optimize-bb-jumps");
+ CmdArgs.push_back("--no-call-graph-profile-sort");
+ CmdArgs.push_back("-z");
----------------
Why --no-call-graph-profile-sort?
================
Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:642
+ CmdArgs.push_back("-z");
+ CmdArgs.push_back("nokeep-text-section-prefix");
+ CmdArgs.push_back("--no-warn-symbol-ordering");
----------------
This will silently ignore user specified `-z keep-text-section-prefix`.
With `-z nokeep-text-section-prefix`, an input section `.text.hot.foo` will go to the output section `.text`, instead of `.text.hot`. Why do you need the option?
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68049/new/
https://reviews.llvm.org/D68049
More information about the cfe-commits
mailing list