]> granicus.if.org Git - llvm/commit
[PGO] Handle cases of non-instrument BBs
authorRong Xu <xur@google.com>
Mon, 10 Jun 2019 22:36:27 +0000 (22:36 +0000)
committerRong Xu <xur@google.com>
Mon, 10 Jun 2019 22:36:27 +0000 (22:36 +0000)
commitf9ab36ca631ede7e179d30f35f00ff55d6ca7766
tree3846e5adf1b2d06fe383f2830709df31ef75a898
parent150fff8ce44fec676b6b2a78fc926abb13a73c06
[PGO] Handle cases of non-instrument BBs

As shown in PR41279, some basic blocks (such as catchswitch) cannot be
instrumented. This patch filters out these BBs in PGO instrumentation.
It also sets the profile count to the fail-to-instrument edge, so that we
can propagate the counts in the CFG.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362995 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Instrumentation/PGOInstrumentation.cpp
test/Transforms/PGOProfile/Inputs/PR41279.proftext [new file with mode: 0644]
test/Transforms/PGOProfile/Inputs/PR41279_2.proftext [new file with mode: 0644]
test/Transforms/PGOProfile/PR41279.ll
test/Transforms/PGOProfile/PR41279_2.ll [new file with mode: 0644]