This is an archive of the discontinued LLVM Phabricator instance.

Refine ArgPromotion metadata handling
ClosedPublic

Authored by tejohnson on Feb 13 2019, 3:48 PM.

Details

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.

Diff Detail

Repository
rL LLVM

Event Timeline

tejohnson created this revision.Feb 13 2019, 3:48 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 13 2019, 3:48 PM
Herald added a subscriber: jdoerfert. · View Herald Transcript
tejohnson edited the summary of this revision. (Show Details)Feb 13 2019, 3:53 PM
davidxl added inline comments.Feb 13 2019, 4:53 PM
lib/Transforms/IPO/ArgumentPromotion.cpp
220 ↗(On Diff #186766)

Is it possible to assert F becomes a decl?

tejohnson marked an inline comment as done.Feb 13 2019, 9:29 PM
tejohnson updated this revision to Diff 186797.Feb 13 2019, 9:30 PM

Add assert

This revision is now accepted and ready to land.Feb 13 2019, 10:41 PM

Thanks for fixing!

This revision was automatically updated to reflect the committed changes.