Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
ELF/Config.h | ||
---|---|---|
93–94 ↗ | (On Diff #52264) | Sort. LTOOptLevel -> LtoO because the members of Config are named after their corresponding command line options. |
ELF/LTO.cpp | ||
65 ↗ | (On Diff #52264) | Directly set Config->LtoOptLevel instead of passing it as a parameter. |
ELF/Options.td | ||
78 ↗ | (On Diff #52264) | 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? |
- Address review comments
ELF/Options.td | ||
---|---|---|
78 ↗ | (On Diff #52264) | It's -plugin-opt=O. I guess we don't want to use any plugin flags here. |
I think I slightly prefer -lto-opt over -lto-O, but I'd like to hear others opinions too.
Slightly off-topic: ld64 does not have this option, and we're not willing to add it. We have been discussing internally about how to communicate the "opt level" to the linker plugin, and we were thinking about some kind of metadata that would carry the configuration (including things like "fast-math" or other codegen related options).
I'm interested in your opinion :)
So the metadata would be carried on from the compiler to the linker? It feels a bit counter intuitive to me because actual LTO happens in the linker instead of the compiler. Also, if two metadata conflicts (for example, if one file has O3 and other is O1), what should we do?