[PGO] Handle cases of failing to split critical edges
authorRong Xu <xur@google.com>
Tue, 28 May 2019 21:45:56 +0000 (21:45 +0000)
committerRong Xu <xur@google.com>
Tue, 28 May 2019 21:45:56 +0000 (21:45 +0000)
commite88173abc01b454f91cec54b50e58e67a5aed263
tree0a4001c99496ce78af8a15b958817f8e3438624f
parent5b32f60ec31ce136edac6f693538aeb6039f4ad0
[PGO] Handle cases of failing to split critical edges

Fix PR41279 where critical edges to EHPad are not split.
The fix is to not instrument those critical edges. We used to be able to know
the size of counters right after MST is computed. With this, we have to
pre-collect the instrument BBs to know the size, and then instrument them.

Differential Revision: https://reviews.llvm.org/D62439

llvm-svn: 361882
llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
llvm/test/Transforms/PGOProfile/PR41279.ll [new file with mode: 0644]