[PATCH] D115648: [LTO] Ignore unreachable virtual functions in WPD in hybrid LTO
Mingming Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 13 09:41:03 PST 2021
luna created this revision.
Herald added subscribers: ormris, pengfei, arphaman, steven_wu, hiraditya, inglorion.
luna requested review of this revision.
Herald added projects: clang, LLVM.
Herald added subscribers: llvm-commits, cfe-commits.
- In FunctionSummary, add a new bit `mustBeUnreachable`.
- In ModuleSummaryAnalysis, set this bit to 1 if a function is unreachable.
- For hybrid LTO, ignore unreachable functions (by reading from index) when finding virtual functions. This helps to de-virtualize. See the test case in llvm/test/ThinLTO/X86/devirt_hybrid_after_filtering_unreachable.ll
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D115648
Files:
clang/test/CodeGen/thinlto-distributed-cfi-devirt.ll
clang/test/CodeGen/thinlto-distributed-cfi.ll
clang/test/CodeGen/thinlto-funcattr-prop.ll
llvm/include/llvm/AsmParser/LLToken.h
llvm/include/llvm/IR/ModuleSummaryIndex.h
llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
llvm/lib/AsmParser/LLLexer.cpp
llvm/lib/AsmParser/LLParser.cpp
llvm/lib/Bitcode/Reader/BitcodeReader.cpp
llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
llvm/lib/IR/ModuleSummaryIndex.cpp
llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp
llvm/test/Assembler/thinlto-summary.ll
llvm/test/Bitcode/thinlto-function-summary-refgraph.ll
llvm/test/Bitcode/thinlto-type-vcalls.ll
llvm/test/ThinLTO/X86/Inputs/devirt_hybrid_after_filtering_unreachable_lib.ll
llvm/test/ThinLTO/X86/devirt_hybrid_after_filtering_unreachable.ll
llvm/test/ThinLTO/X86/dot-dumper.ll
llvm/test/ThinLTO/X86/dot-dumper2.ll
llvm/test/ThinLTO/X86/funcattrs-prop-maythrow.ll
llvm/test/ThinLTO/X86/funcimport_alwaysinline.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115648.393940.patch
Type: text/x-patch
Size: 63847 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211213/e5574f3d/attachment-0001.bin>
More information about the cfe-commits
mailing list