OSDN Git Service

[IR] Convert profile metadata in createCallMatchingInvoke()
authorYevgeny Rouban <yrouban@azul.com>
Sat, 20 Jun 2020 05:06:01 +0000 (12:06 +0700)
committerYevgeny Rouban <yrouban@azul.com>
Sat, 20 Jun 2020 05:10:31 +0000 (12:10 +0700)
commit6429471e8b766b841644f224b5c6525a9b3227c9
tree1cfc518b328987df01178c3b666000dfd583f6b2
parentdd48c57da35e069c739361ce822b98c6e42f555e
[IR] Convert profile metadata in createCallMatchingInvoke()

When an invoke instruction is converted to a call its
profile metadata is dropped because it has incompatible
format (see commit 16ad6eeb94ff).
This patch adds an attempt to convert profile data to
format of the call instruction. This used to work well
before the commit dcfa78a4ccec.

Reviewers: reames
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D82071
llvm/lib/Transforms/Utils/Local.cpp
llvm/test/Transforms/SimplifyCFG/invoke_unwind.ll