]> granicus.if.org Git - llvm/commit
ArgumentPromotion should copy all metadata to new Function
authorTeresa Johnson <tejohnson@google.com>
Fri, 8 Feb 2019 17:08:27 +0000 (17:08 +0000)
committerTeresa Johnson <tejohnson@google.com>
Fri, 8 Feb 2019 17:08:27 +0000 (17:08 +0000)
commita54c8af4c3f8bc2b01500a427aeeb2e01a5c9495
tree352925f7950d7cff1a03c9366d7ad7acae1de4a9
parent88d276dbda3058a0d2f89ad4db75324da01f9634
ArgumentPromotion should copy all metadata to new Function

Summary:
ArgumentPromotion had code to specifically move the dbg metadata over to
the new function, but other metadata such as the function_entry_count
!prof metadata was not. Replace code that moved dbg metadata with a call
to copyMetadata. The old metadata is automatically removed when the old
Function is removed.

Reviewers: davidxl

Subscribers: llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@353537 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/IPO/ArgumentPromotion.cpp
test/Transforms/ArgumentPromotion/profile.ll