This is an archive of the discontinued LLVM Phabricator instance.

[Bitcode][Asm] Parse metadata value from operand bundles
AbandonedPublic

Authored by necipfazil on Jul 21 2021, 10:40 PM.

Details

Summary

Support parsing operand bundles with metadata value from LLVM IR.

Diff Detail

Event Timeline

necipfazil created this revision.Jul 21 2021, 10:40 PM
necipfazil requested review of this revision.Jul 21 2021, 10:40 PM
Herald added a project: Restricted Project. · View Herald TranscriptJul 21 2021, 10:40 PM

This is needed for D105909 since it attaches type identifiers to call sites as operand bundles with metadata value. Now we can successfully compile LLVM IR with metadata operand bundles to object file while preserving the bundle value.

On the other hand, we cannot read metadata value in and out, i.e., operand bundle value is garbage when LLVM IR is compiled to bitcode, then disassembled back to LLVM IR. One of the tests [1] is a small reproducer.

[1] llvm/test/Bitcode/2021-07-22-Metadata-Operand-Bundles.ll

necipfazil abandoned this revision.Jul 28 2021, 11:21 PM

Abandoning this revision since it is split to two:

  1. D107038: Fix parser to read metadata operand bundle values in.
  2. D107039: Add tests to reproduce the bug in reading metadata operand bundle values out, and additional tests to test the fix to the issue.

This split allows the metadata-operand-bundle-value producer/consumer revisions (D105909 and D105915) to progress with the fix revision 1 above, without waiting for a fix to revision-2.