[FS-AFDO] Assign discriminators to pseudo probes
authorHongtao Yu <hoy@fb.com>
Fri, 31 Mar 2023 00:36:51 +0000 (17:36 -0700)
committerHongtao Yu <hoy@fb.com>
Wed, 5 Apr 2023 00:04:37 +0000 (17:04 -0700)
commit5b461d5ec172d21029da492064704fe3da6f8bab
tree123e5b32d56d5c2b2d2cc3882a7f03557e4d7abc
parentdbbf8ff839e919c090737c3df114fbc7e3623270
[FS-AFDO] Assign discriminators to pseudo probes

This is the first change for FS-AFDO integration with CSSPGO. There are more patches coming.

With pseudo probes, we do not assign FS discriminators to any other instructions since we will be using only probes for profile correlation.

Also call instructions are excluded since their dwarf discriminators are used for other purposes, i.e, storing probe ids. Since they are not getting a FS discriminator, they will also be excluded from MIR profile loading. The corresponding changes will be in the subsequent patches.

Reviewed By: wenlei

Differential Revision: https://reviews.llvm.org/D147286
llvm/lib/CodeGen/MIRFSDiscriminator.cpp
llvm/test/CodeGen/X86/fsafdo_probe.ll [new file with mode: 0644]