[all-commits] [llvm/llvm-project] 456eb4: [PseudoProbe] Only emit discriminstor in FS-AFDO m...
Hongtao Yu via All-commits
all-commits at lists.llvm.org
Tue May 16 21:35:43 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 456eb4b5bffe42d109c09b8706d4eeda8baa1f9a
https://github.com/llvm/llvm-project/commit/456eb4b5bffe42d109c09b8706d4eeda8baa1f9a
Author: Hongtao Yu <hoy at fb.com>
Date: 2023-05-16 (Tue, 16 May 2023)
Changed paths:
M llvm/lib/CodeGen/AsmPrinter/PseudoProbePrinter.cpp
Log Message:
-----------
[PseudoProbe] Only emit discriminstor in FS-AFDO mode.
Despite previous effort {D148569} to avoid screwing up existing disrminator field, I'm still seeing some call probes getting a non-zero discriminator eventually in non-FS mode. It could be related to callsite merge. While they are investigated I'm disabling discriminator emission for non-FS mode. This avoids breaking the compatiblity with older tools like llvm-profgen and bolt.
Reviewed By: wenlei
Differential Revision: https://reviews.llvm.org/D150625
Commit: d4d6b9a142f0017b4d5668155fbbe045c838b8a6
https://github.com/llvm/llvm-project/commit/d4d6b9a142f0017b4d5668155fbbe045c838b8a6
Author: Hongtao Yu <hoy at fb.com>
Date: 2023-05-16 (Tue, 16 May 2023)
Changed paths:
M llvm/include/llvm/CodeGen/MIRFSDiscriminator.h
M llvm/lib/CodeGen/MIRFSDiscriminator.cpp
M llvm/test/CodeGen/X86/fsafdo_probe.ll
Log Message:
-----------
[FS-AFDO] Clean up non-zero discriminator for pseudo probes at the first FS discriminator pass.
The dwarf discriminator field for pseudo probes is not supposed to be used until the first FS discriminator pass. Unfortunately there are always corner cases that accidientally set this field. For example, the inliner could set this field for an inlined instruction if the instruction does not come with any debug information. While fixing all such spots is possible, but for future-proff I'd like to enforce a general cleanup before assigning probes any FS discriminator.
Reviewed By: wenlei
Differential Revision: https://reviews.llvm.org/D150741
Compare: https://github.com/llvm/llvm-project/compare/b27f14d920e1...d4d6b9a142f0
More information about the All-commits
mailing list