[PATCH] D12455: [IR] Teach `llvm::User` to co-allocate a descriptor.

Sanjoy Das via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 28 16:22:59 PDT 2015


sanjoy created this revision.
sanjoy added reviewers: reames, chandlerc, dexonsmith, JosephTremoulet, kmod.
sanjoy added a subscriber: llvm-commits.

With this change, subclasses of `llvm::User` will be able to co-allocate
a variable number of bytes (called a "descriptor") with the `llvm::User`
instance.  The co-allocated descriptor can later be accessed using
`llvm::User::getDescriptor`.  This will be used in later changes to
implement operand bundles.

This change steals one bit from `NumUserOperands`, but given that it is
still 28 bits wide I don't think this will be a practical issue.

This change does not allow allocating hung off uses with descriptors.
This only for simplicity, not for any fundamental reason; and we can
easily add this functionality later if needed.

http://reviews.llvm.org/D12455

Files:
  include/llvm/IR/User.h
  include/llvm/IR/Value.h
  lib/IR/User.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D12455.33487.patch
Type: text/x-patch
Size: 5340 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150828/1beea905/attachment.bin>


More information about the llvm-commits mailing list