This is an archive of the discontinued LLVM Phabricator instance.

Keep metadata when changing Invoke instructions to Call ones
AbandonedPublic

Authored by yrouban on Jul 5 2017, 12:14 AM.

Details

Summary

Metadata of invoke instructions get lost after SimplifyCFGPass.
Turning invokes that call 'nounwind' functions into ordinary calls the method changeToCall()
does not move or copy metadata from the source invoke instruction to the new call instruction.
This patch copies the metadata in changeToCall().

Diff Detail

Event Timeline

yrouban created this revision.Jul 5 2017, 12:14 AM
yrouban updated this revision to Diff 105370.Jul 5 2017, 9:19 PM

Added a new test.

yrouban abandoned this revision.Aug 1 2017, 9:50 PM

Decided to make use of attributes instead of metadata. Attributes are copied by most transformations.