This is to address feature request from https://github.com/ClangBuiltLinux/linux/issues/1665
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
When a module with "indirect_branch_cs_prefix" and another without the module flag are merged, what the result should be? If 0, we should use Min instead of Override.
clang/lib/Driver/ToolChains/Clang.cpp | ||
---|---|---|
6362 | Check CC1Option uses in clang/include/clang/Driver/Options.td |
Add CC1 option test.
When a module with "indirect_branch_cs_prefix" and another without the module flag are merged, what the result should be? If 0, we should use Min instead of Override.
I think Override is correct. This option is used for Linux Kernel build. When merged, all should be set to 1.
clang/lib/Driver/ToolChains/Clang.cpp | ||
---|---|---|
6362 | This is not needed with the TableGen CC1Option change. |
clang/lib/Driver/ToolChains/Clang.cpp | ||
---|---|---|
6362 | Do you have an example how to change the CC1Option? Removing the code directly won't generate the expected module flag anymore. |
Thanks for review!
clang/lib/Driver/ToolChains/Clang.cpp | ||
---|---|---|
6362 | Good to know such usage. Thank you! |
This change caused a significant compile-time regression for O0 builds (about 1%): http://llvm-compile-time-tracker.com/compare.php?from=45bae1be90472c696f6ba3bb4f8fabee76040fa9&to=6f867f9102838ebe314c1f3661fdf95700386e5a&stat=instructions
At a guess, fetching a module flag for every single instruction is slow?
Check CC1Option uses in clang/include/clang/Driver/Options.td