[all-commits] [llvm/llvm-project] eddec9: [Pseudo probe] Duplicate probes in vectorized loop...
Hongtao Yu via All-commits
all-commits at lists.llvm.org
Wed Feb 15 10:18:23 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: eddec9de44cd6b1ccbe825eec725f27ae5a2b982
https://github.com/llvm/llvm-project/commit/eddec9de44cd6b1ccbe825eec725f27ae5a2b982
Author: Hongtao Yu <hoy at fb.com>
Date: 2023-02-15 (Wed, 15 Feb 2023)
Changed paths:
M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
A llvm/test/Transforms/SampleProfile/pseudo-probe-loop-vectorize.ll
Log Message:
-----------
[Pseudo probe] Duplicate probes in vectorized loop body.
Prevoius pseudo probes were dropped out of a vectorized loop body during loop vectorization. This can result in the samples of the loop entry is used for the loop body, which in turn can cause undercounting of the loop iteration count. The undercounting can further prevent the loop from being vectorized in the next build. I'm fixing this by explicting allowing pseudo probes to be kept in the vectorized loop body, and by claiming a probe instruction is not "uniform", the vectorizer will duplicate it by the number of vector lanes.
For one internal service, I'm seeing the change causes the size increase of the .pseudoprobe section by 0.7%, which should count around 0.2% of the whole binary size.
Reviewed By: wenlei
Differential Revision: https://reviews.llvm.org/D144066
More information about the All-commits
mailing list