[PATCH] D18667: ELF: Add flag for controlling LTO optimization level.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 31 12:59:34 PDT 2016
ruiu added inline comments.
================
Comment at: ELF/Config.h:93-94
@@ -92,3 +92,4 @@
uint64_t EntryAddr = -1;
unsigned Optimize = 0;
+ unsigned LTOOptLevel = 2;
};
----------------
Sort.
LTOOptLevel -> LtoO because the members of Config are named after their corresponding command line options.
================
Comment at: ELF/LTO.cpp:65
@@ -64,3 +64,3 @@
PMB.SLPVectorize = true;
- PMB.OptLevel = 2; // FIXME: This should be an option.
+ PMB.OptLevel = OptLevel;
PMB.populateLTOPassManager(LtoPasses);
----------------
Directly set Config->LtoOptLevel instead of passing it as a parameter.
================
Comment at: ELF/Options.td:78
@@ -77,1 +77,3 @@
+def lto_O : Joined<["--"], "lto-O">, MetaVarName<"<opt-level>">,
+ HelpText<"Optimization level for LTO">;
----------------
I don't know if -lto-O is a good name. Does the gold LTO plugin have a simliar option? If so, what's the name of the option?
http://reviews.llvm.org/D18667
More information about the llvm-commits
mailing list