This is an archive of the discontinued LLVM Phabricator instance.

[mlir][llvmir] Fixed MDNode uniquing during TBAA translation.
ClosedPublic

Authored by vzakhari on Jan 13 2023, 1:53 PM.

Details

Summary

In the process of creating the MDNodes for the TBAA tag operations
we used to produce incomplete MDNodes like:

@__tbaa::@tbaa_tag_4 => !{!null, !null, i64 0}
@__tbaa::@tbaa_tag_7 => !{!null, !null, i64 0}

This caused the two tags to map to the same incomplete MDNode due to uniquing.
To prevent this, we have to use temporary MDNodes instead of !null's.

Diff Detail

Event Timeline

vzakhari created this revision.Jan 13 2023, 1:53 PM
vzakhari requested review of this revision.Jan 13 2023, 1:53 PM
ftynse accepted this revision.Jan 16 2023, 5:36 AM
This revision is now accepted and ready to land.Jan 16 2023, 5:36 AM

Thank you, Vitaly! I will take a look.