[all-commits] [llvm/llvm-project] 8acb88: [PGO] Add a threshold for number of critical edges...
xur-llvm via All-commits
all-commits at lists.llvm.org
Wed Nov 2 10:24:04 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 8acb881c19270ac487c8fc1d0041bc257d824dd5
https://github.com/llvm/llvm-project/commit/8acb881c19270ac487c8fc1d0041bc257d824dd5
Author: Rong Xu <xur at google.com>
Date: 2022-11-02 (Wed, 02 Nov 2022)
Changed paths:
M llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
A llvm/test/Transforms/PGOProfile/critical-edge-threshold.ll
Log Message:
-----------
[PGO] Add a threshold for number of critical edges in PGO
For some auto-generated sources, we have a huge number of critical
edges (like from switch statements). We have seen instance of 183777
critical edges in one function.
After we split the critical edges in PGO instrumentation/profile-use
pass, the CFG is so large that we have compiler time issues in
downstream passes (like in machine CSE and block placement). Here I
add a threshold to skip PGO if the number of critical edges are too
large.
The threshold is large enough so that it will not affect the majority
of PGO compilation.
Also sync the logic for skipping instrumentation and profile-use. I
think this is the correct thing to do.
Differential Revision: https://reviews.llvm.org/D137184
More information about the All-commits
mailing list