This is an archive of the discontinued LLVM Phabricator instance.

[Transforms] Do not drop !preserve.access.index metadata
ClosedPublic

Authored by yonghong-song on Aug 3 2019, 11:00 AM.

Details

Summary

Currently, when a GVN or CSE optimization happens,
the llvm.preserve.access.index metadata is dropped.
This caused a problem for BPF AbstructMemberOffset phase
as it relies on the metadata (debuginfo types).

This patch added proper hooks in lib/Transforms to
preserve !preserve.access.index metadata. A test
case is added to ensure metadata is preserved under CSE.

Diff Detail

Repository
rL LLVM

Event Timeline

yonghong-song created this revision.Aug 3 2019, 11:00 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 3 2019, 11:00 AM
ast accepted this revision.Aug 3 2019, 11:29 AM

lgtm

This revision is now accepted and ready to land.Aug 3 2019, 11:29 AM
This revision was automatically updated to reflect the committed changes.