[PATCH] MIR Serialization: Initial serialization of stack objects.

Alex L arphaman at gmail.com
Thu Jul 9 15:15:36 PDT 2015


Hello,

This patch implements the initial serialization of stack objects from the
MachineFrameInfo class. It can only serialize the ordinary stack objects
(including ordinary spill slots), but it doesn't serialize variable sized
or fixed stack objects yet.

The stack objects are serialized using a YAML sequence of YAML inline
mappings. Each mapping ha s the object's ID, type, size, offset and
alignment. Example:

  stack:
    - { id: 0, offset: -12, size: 4, alignment: 4 }
    - { id: 1, offset: -24, size: 8, alignment: 8 }
    - { id: 2, type: spill-slot, offset: -32, size: 4, alignment: 4 }

The stack objects are a part of machine function's YAML mapping.

The follow up patches will serialize the variable sized and fixed stack
objects. The variable sized stack objects will use a different type to
distinguish them from ordinary stack objects, but the fixed stack objects
will use a different YAML sequence of fixed stack objects, Example:

fixedStack:
  - { id: 0, offset: 0, size: 4, alignment: 4, isImmutable: true,
isAliased: false }
stack:
  - { id: 0, offset: -8, size: 4, alignment: 4 }

The machine operands will reference the stack objects using the following
syntax:

    %<id>[.<name>]

Thanks,
Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150709/0a46e3df/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-MIR-Serialization-Initial-serialization-of-stack-obj.patch
Type: application/octet-stream
Size: 9332 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150709/0a46e3df/attachment.obj>


More information about the llvm-commits mailing list