[PATCH] D66936: [DFAPacketizer] Track resources for packetized instructions

James Molloy via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 29 03:46:15 PDT 2019


jmolloy created this revision.
jmolloy added reviewers: ThomasRaoux, kparzysz.
Herald added subscribers: llvm-commits, jsji.
Herald added a project: LLVM.

This patch allows the DFAPacketizer to be queried after a packet is formed to work out which
resources were allocated to the packetized instructions.

This is particularly important for targets that do their own bundle packing - it's not
sufficient to know simply that instructions can share a packet; which slots are used is
also required for encoding.

This extends the emitter to emit a side-table containing resource usage diffs for each
state transition. The packetizer maintains a set of all possible resource states in its
current state. After packetization is complete, all remaining resource states are
possible packetization strategies.

The sidetable is only ~500K for Hexagon, but the extra tracking is disabled by default
(most uses of the packetizer like MachinePipeliner don't care and don't need the extra
maintained state).


Repository:
  rL LLVM

https://reviews.llvm.org/D66936

Files:
  include/llvm/CodeGen/DFAPacketizer.h
  lib/CodeGen/DFAPacketizer.cpp
  lib/Target/Hexagon/HexagonVLIWPacketizer.cpp
  test/CodeGen/Hexagon/packetizer-resources.ll
  utils/TableGen/DFAPacketizerEmitter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66936.217824.patch
Type: text/x-patch
Size: 21246 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190829/4fa7596b/attachment.bin>


More information about the llvm-commits mailing list