[PATCH] D115648: [LTO] Ignore unreachable virtual functions in WPD in thin LTO

Mingming Liu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 14 17:59:57 PST 2021


luna added a comment.

thanks for review!



================
Comment at: llvm/test/ThinLTO/X86/devirt_after_filtering_unreachable.ll:64
+; Check that EnableSplitLTOUnit is off, and check the content of summary information.
+; RUN: llvm-dis -o - %t3.o | FileCheck %s --check-prefix=NOENABLESPLITFLAG
+; NOENABLESPLITFLAG-DAG: !{i32 1, !"EnableSplitLTOUnit", i32 0}
----------------
tejohnson wrote:
> This stuff is checked in other tests. Unless you are checking something specific to this test, you can remove all of this. Actually, it would be good to test here and in the earlier hybrid case that the summary for _ZN4BaseD0Ev says it is unreachable. But that's probably all you need to test.
> 
> Ditto for %t4.o
Done by
1) checking the bit `mustBeUnreachable` for thin LTO and hybrid LTO, and remove irrelevant lines
2) Use one prefix per `FileCheck`.

I spent some time trying to figure out  why the regular LTO split modules (files with ".1" suffix in mod-extract output) don't have function summaries. 

Didn't figure out from code perspective (starting from `Index->enableSplitLTOUnit()` in https://github.com/llvm/llvm-project/blob/main/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp#L3926), but it's probably intended in the sense that regular LTO module won't need index (which is generated for thin).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115648/new/

https://reviews.llvm.org/D115648



More information about the llvm-commits mailing list