[llvm] [NVPTX] Misc table-gen cleanup (NFC) (PR #142877)

Alex MacLean via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 6 16:40:51 PDT 2025


================
@@ -513,14 +498,14 @@ class CpAsyncBulkStr<bit mc, bit ch, bit mask = 0> {
 }
 
 multiclass CP_ASYNC_BULK_S2G_INTR<bit has_ch> {
-  def NAME : NVPTXInst<(outs), (ins ADDR:$dst, ADDR:$src, Int32Regs:$size, Int64Regs:$ch),
+  def "" : NVPTXInst<(outs), (ins ADDR:$dst, ADDR:$src, Int32Regs:$size, Int64Regs:$ch),
----------------
AlexMaclean wrote:

I suppose it is a mostly a matter of taste, but I think our current style is fairly inconsistent. If we use `def NAME :` for the case where we want the exact name of the multiclass, should we also use `def NAME # _abc :` for other definitions within such multiclasses? What about multiclasses where there isn't a no-suffix def, should we still use `def NAME # _abc` there too?

It's not super clear where to draw the line once we start using NAME for multiclass member definitions and in practice it seems that we have made lots of different decisions in different places as a result.  I personally lean towards having it everywhere or nowhere and nowhere seems like it will be less visually cluttered. My count shows 267 results for "" and 298 for NAME (although maybe I'm including some files I shouldn't) so roughly tied in terms of usage. 

@Artem-B if you're unconvinced by these arguments let me know and I'm happy to revert these changes in the interest of getting the rest landed :). 

https://github.com/llvm/llvm-project/pull/142877


More information about the llvm-commits mailing list