[all-commits] [llvm/llvm-project] 9272d0: [PseudoProbe] Clean up dwarf discriminator and avo...
Hongtao Yu via All-commits
all-commits at lists.llvm.org
Wed May 10 11:26:42 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9272d0f07932d3b6804360cd6f3e754a07df4fb2
https://github.com/llvm/llvm-project/commit/9272d0f07932d3b6804360cd6f3e754a07df4fb2
Author: Hongtao Yu <hoy at fb.com>
Date: 2023-05-10 (Wed, 10 May 2023)
Changed paths:
M llvm/include/llvm/IR/DebugInfoMetadata.h
M llvm/lib/Transforms/IPO/SampleProfileProbe.cpp
M llvm/lib/Transforms/Utils/LoopUnroll.cpp
M llvm/lib/Transforms/Utils/LoopUnrollAndJam.cpp
M llvm/lib/Transforms/Vectorize/VPlan.cpp
M llvm/test/Transforms/LoopVectorize/discriminator.ll
M llvm/test/Transforms/SampleProfile/pseudo-probe-emit.ll
M llvm/test/Transforms/SampleProfile/pseudo-probe-profile-mismatch.ll
Log Message:
-----------
[PseudoProbe] Clean up dwarf discriminator and avoid duplicating factor.
A pseudo probe is created with dwarf line information shared with its nearest instruction. If the instruction comes with a dwarf discriminator, it will be shared with the probe as well. This can confuse the later FS-AFDO discriminator assignment pass. To fix this, I'm cleaning up the discriminator fields for probes when they are inserted.
I also notice another possibility to change the discriminator field of pseudo probes in the pipeline before the FS discriminator assignment pass. That is the loop unroller, which assigns duplication factor to instruction being vectorized. I'm disabling that for pseudo probe intrinsics specifically, also for callsites with probes.
Reviewed By: wenlei
Differential Revision: https://reviews.llvm.org/D148569
More information about the All-commits
mailing list