[PATCH] D153509: [WIP][IR] Add RangeMetadata on top of ExtMetadata

Nicolai Hähnle via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 22 01:27:22 PDT 2023


nhaehnle created this revision.
Herald added a subscriber: hiraditya.
Herald added a project: All.
nhaehnle requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This is an extremely rough draft of a potential change to replace !range
metadata by something implemented on top of ExtMetadata.

That is, replace

  !range !{ i32 5, i32 20 }

by something like

  !range !llvm.range{ ranges: [{ lo: i32 5, hi: i32 20 }] }

Structured data doesn't actually have arrays at the time of writing, so
the draft is limited to a single lo/hi pair. The main point is to show
a concrete example and explore how the ExtMetadata infrastructure is used.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D153509

Files:
  llvm/include/llvm/IR/ExtMetadata.h
  llvm/lib/IR/ConstantRange.cpp
  llvm/lib/IR/ExtMetadata.cpp
  llvm/lib/IR/LLVMContext.cpp
  llvm/lib/IR/MDBuilder.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153509.533504.patch
Type: text/x-patch
Size: 7065 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230622/c9515669/attachment.bin>


More information about the llvm-commits mailing list