[PGO] Support PGO annotation of CallBrInst
authorRong Xu <xur@google.com>
Thu, 1 Sep 2022 21:13:50 +0000 (14:13 -0700)
committerRong Xu <xur@google.com>
Thu, 1 Sep 2022 21:13:50 +0000 (14:13 -0700)
commit0caa4a9559edcbb4195ce140de0658e46a90b52a
treeadb2fbe38b26d5da0f77dd49d93acc8e36141baf
parentde3633e746dba4774ba7f638f04e9c8f2541fd54
[PGO] Support PGO annotation of CallBrInst

We currently instrument CallBrInst but do not annotate it with
the branch weight. This patch enables PGO annotation of CallBrInst.

Differential Revision: https://reviews.llvm.org/D133040
llvm/lib/Analysis/BranchProbabilityInfo.cpp
llvm/lib/IR/Verifier.cpp
llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
llvm/test/Transforms/PGOProfile/Inputs/callbr.proftext [new file with mode: 0644]
llvm/test/Transforms/PGOProfile/callbr.ll