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

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 14 18:05:35 PST 2021


tejohnson accepted this revision.
tejohnson added a comment.
This revision is now accepted and ready to land.

lgtm with one more test simplification below.



================
Comment at: llvm/test/ThinLTO/X86/devirt_after_filtering_unreachable.ll:11
+; RUN: llvm-dis -o - %t-main.bc.0 | FileCheck %s --check-prefix=ENABLESPLITFLAG
+; ENABLESPLITFLAG-DAG: [[BaseD0:\^[0-9]+]] = gv: (name: "_ZN4BaseD0Ev", {{.*}}, funcFlags: ({{.*}} mustBeUnreachable: 1
+
----------------
Since we don't ever use variable BaseD0, there isn't a need to capture a value there. In fact, you can ignore it completely and then change all 4 llvm-dis instances in this test to check the same pattern like:

; FLAG: gv: (name: "_ZN4BaseD0Ev", {{.*}}, funcFlags: ({{.*}} mustBeUnreachable: 1

(and no need for the -DAG handling since there is only one pattern being checked per llvm-dis invocation).


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