[all-commits] [llvm/llvm-project] 7d05f6: [TableGen][CallingConv] Add CCAssignToRegTuple for...

Jason Eckhardt via All-commits all-commits at lists.llvm.org
Wed Apr 30 16:32:59 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7d05f67a7377ad67e7eb15e0f8f7cf1f537b5afa
      https://github.com/llvm/llvm-project/commit/7d05f67a7377ad67e7eb15e0f8f7cf1f537b5afa
  Author: Jason Eckhardt <jeckhardt at nvidia.com>
  Date:   2025-04-30 (Wed, 30 Apr 2025)

  Changed paths:
    M llvm/include/llvm/Target/TargetCallingConv.td
    A llvm/test/TableGen/cc-assign-to-reg-tuple.td
    M llvm/utils/TableGen/CallingConvEmitter.cpp

  Log Message:
  -----------
  [TableGen][CallingConv] Add CCAssignToRegTuple for synthetic registers. (#137826)

Currently CCAssignToReg takes a list<Register>. There are tuple-heavy
back-ends where we would like to reference any register-- whether those
are singletons or those defined by RegisterTuples. However, the latter
are synthesized during tuple expansion and are not visible outside of
the register info emitter.

The problem is that the parser will see tuple registers as undefined
variables before the calling convention emitter is ever reached. To
defer evaluation of the symbol, we introduce CCAssignToRegTuple which
takes list<string> instead. This allows us to defer the actual
register name lookup until the emitter runs-- where we also validate
that the register actually exists.

This is currently used in a downstream back-end which will be upstreamed
very soon. In the meantime, a unit test is provided to exercise the
feature.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list