[PATCH] D150370: Introduce StructuredData

Nicolai Hähnle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 11 07:36:43 PDT 2023


nhaehnle created this revision.
nhaehnle added reviewers: jcranmer, jdoerfert, nikic, jsilvanus, Flakebi.
Herald added subscribers: StephenFan, hiraditya.
Herald added a project: All.
nhaehnle requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

StructuredData is a fairly general mechanism for representing extensible
data in textual IR and in bitcode.

It is intended primarily as an abstraction layer used during IR printing,
parsing and (bitcode de-)serialization.

However, it can also be used to preserve structured data as-is for
extension points in tools where a particular extension isn't understood.

Possible use cases range over:

- Encoding TargetTypeInfo -- this is the use case that initially triggered this development
- Extensible human-readable and compile-time efficient metadata a la debug info metadata
- Human-readable and compile-time efficient modifiers on extended instructions / intrinsics

This change already includes rudimentary printing and parsing support.
Bitcode reading and writing will follow in a subsequent change.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D150370

Files:
  llvm/docs/LangRef.rst
  llvm/include/llvm/AsmParser/LLParser.h
  llvm/include/llvm/IR/StructuredData.h
  llvm/lib/AsmParser/LLParser.cpp
  llvm/lib/IR/AsmWriter.cpp
  llvm/lib/IR/CMakeLists.txt
  llvm/lib/IR/StructuredData.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150370.521309.patch
Type: text/x-patch
Size: 14708 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230511/51867626/attachment.bin>


More information about the llvm-commits mailing list