diff options
author | Junfeng Dong <jfdong@fb.com> | 2022-03-23 08:54:52 -0700 |
---|---|---|
committer | Hongtao Yu <hoy@fb.com> | 2022-03-23 08:55:30 -0700 |
commit | 72acd042bad35f78232f17addc02196a7af1a6e9 (patch) | |
tree | 9c461e23a700c701526e5d7362a049a34448bac3 /clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp | |
parent | 3ea6727e33d24c54ea6afb8887846a1f9a1011c3 (diff) | |
download | llvm-72acd042bad35f78232f17addc02196a7af1a6e9.zip llvm-72acd042bad35f78232f17addc02196a7af1a6e9.tar.gz llvm-72acd042bad35f78232f17addc02196a7af1a6e9.tar.bz2 |
Pass split-machine-functions to code generator when flto is used
-fsplit-machine-functions is an optimization in codegen phase. when -flto is use, clang generate IR bitcode in .o files, and linker will call into these codegen optimization passes. Current clang driver doesn't pass this option to linker when both -fsplit-machine-functions and -flto are used, so the optimization is silently ignored. My fix generates linker option -plugin-opt=-split-machine-functions for this case. It allows the linker to pass "split-machine-functions" to code generator to turn on that optimization. It works for both gold and lld.
Reviewed By: hoy, wenlei
Differential Revision: https://reviews.llvm.org/D121969
Diffstat (limited to 'clang/lib/ExtractAPI/Serialization/SymbolGraphSerializer.cpp')
0 files changed, 0 insertions, 0 deletions