[PATCH] D30920: Do not pass -Os and -Oz to the Gold plugin
Teresa Johnson via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 13 17:24:27 PDT 2017
tejohnson added a comment.
Interested in pcc's thoughts, as https://bugs.llvm.org/show_bug.cgi?id=32155 mentioned you already discussed with him. Note that some of the passes that check PassManagerBuilder::sizeLevel are added during the ThinLTO back end (e.g. populateModulePassManager which checks sizeLevel is invoked by populateThinLTOPassManager). Until everything is converted to using size attributes, it seems like a correct fix for the bug is to accept these options in the gold-plugin and pass through the LTO API to the PassManagerBuilder.
================
Comment at: lib/Driver/ToolChains/CommonArgs.cpp:369
if (A->getOption().matches(options::OPT_O4) ||
- A->getOption().matches(options::OPT_Ofast))
+ A->getOption().matches(options::OPT_Ofast)) {
OOpt = "3";
----------------
Remove added "{"
================
Comment at: lib/Driver/ToolChains/CommonArgs.cpp:377
+ OOpt = OptLevel;
+ } else if (A->getOption().matches(options::OPT_O0)) {
OOpt = "0";
----------------
Ditto about unnecessary "{"
https://reviews.llvm.org/D30920
More information about the cfe-commits
mailing list