OSDN Git Service

Refine ArgPromotion metadata handling
authorTeresa Johnson <tejohnson@google.com>
Thu, 14 Feb 2019 14:14:24 +0000 (14:14 +0000)
committerTeresa Johnson <tejohnson@google.com>
Thu, 14 Feb 2019 14:14:24 +0000 (14:14 +0000)
commit978f4b006b0a894de2ec5b10cbf86c815de436e0
tree998ffecd0e84c198543cac9035d1281f894a83a0
parentb57f41fcaa70aac973c9b4d78f399f8348f9b998
Refine ArgPromotion metadata handling

Summary:
In r353537 we now copy all metadata to the new function, with the old
being removed when the old function is eliminated. In some cases the old
function is dropped to a declaration (seems to only occur with the old
PM). Go ahead and clear all metadata from the old function to handle that
case, since verification will complain otherwise. This is consistent
with what was being done for debug metadata before r353537.

Reviewers: davidxl, uabelho

Subscribers: jdoerfert, llvm-commits

Tags: #llvm

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@354032 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/IPO/ArgumentPromotion.cpp
test/Transforms/ArgumentPromotion/dbg2.ll [new file with mode: 0644]