diff options
author | Teresa Johnson <tejohnson@google.com> | 2023-05-10 16:05:41 -0700 |
---|---|---|
committer | Teresa Johnson <tejohnson@google.com> | 2023-05-11 09:10:32 -0700 |
commit | a40b0c3e77a28b8dee5af7f9d9cdc9ad5919077e (patch) | |
tree | e3ffe8d3752d9c4d9163e8d811b2f8f919ef4241 /llvm/lib/LTO/LTOBackend.cpp | |
parent | 236a0e82df37d3a11f57c34df43bea1904a29530 (diff) | |
download | llvm-a40b0c3e77a28b8dee5af7f9d9cdc9ad5919077e.zip llvm-a40b0c3e77a28b8dee5af7f9d9cdc9ad5919077e.tar.gz llvm-a40b0c3e77a28b8dee5af7f9d9cdc9ad5919077e.tar.bz2 |
[WPD] Update llvm.public.type.test after importing functions
I noticed that we are converting llvm.public.type.test to regular
llvm.type.test too early, and thus not updating those in imported
functions. This would result in losing out on WPD opportunities. Move
the update to after function importing, and improve test to cover this
case.
Differential Revision: https://reviews.llvm.org/D150326
Diffstat (limited to 'llvm/lib/LTO/LTOBackend.cpp')
-rw-r--r-- | llvm/lib/LTO/LTOBackend.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/LTO/LTOBackend.cpp b/llvm/lib/LTO/LTOBackend.cpp index a089cbe..667ebb0 100644 --- a/llvm/lib/LTO/LTOBackend.cpp +++ b/llvm/lib/LTO/LTOBackend.cpp @@ -565,8 +565,6 @@ Error lto::thinBackend(const Config &Conf, unsigned Task, AddStreamFn AddStream, // the module, if applicable. Mod.setPartialSampleProfileRatio(CombinedIndex); - updatePublicTypeTestCalls(Mod, CombinedIndex.withWholeProgramVisibility()); - if (Conf.CodeGenOnly) { codegen(Conf, TM.get(), AddStream, Task, Mod, CombinedIndex); return finalizeOptimizationRemarks(std::move(DiagnosticOutputFile)); @@ -653,6 +651,7 @@ Error lto::thinBackend(const Config &Conf, unsigned Task, AddStreamFn AddStream, // Do this after any importing so that imported code is updated. updateMemProfAttributes(Mod, CombinedIndex); + updatePublicTypeTestCalls(Mod, CombinedIndex.withWholeProgramVisibility()); if (Conf.PostImportModuleHook && !Conf.PostImportModuleHook(Task, Mod)) return finalizeOptimizationRemarks(std::move(DiagnosticOutputFile)); |