[PATCH] D43151: [NVPTX] TblGen-ized lowering of WMMA intrinsics.
Justin Lebar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 12 11:58:42 PST 2018
jlebar added a comment.
Some comments, but mainly I'm just bewildered by tablegen.
================
Comment at: llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp:3636
+bool NVPTXDAGToDAGISel::SelectADDRvar(SDNode *OpNode, SDValue Addr,
+ SDValue &Value) {
----------------
Is it worth having a comment on this one?
================
Comment at: llvm/lib/Target/NVPTX/NVPTXIntrinsics.td:7420
string Type, NVPTXRegClass regclass,
- Operand SrcOp, int WithOffset, int WithStride>
- : NVPTXInst<!if(!eq(Abc#Type,"cf16"),
- (outs regclass:$r0, regclass:$r1, regclass:$r2, regclass:$r3),
- (outs regclass:$r0, regclass:$r1, regclass:$r2, regclass:$r3,
- regclass:$r4, regclass:$r5, regclass:$r6, regclass:$r7)),
- !if(WithStride,
- !if(WithOffset,
- (ins SrcOp:$src, i32imm:$offset, Int32Regs:$ldm),
- (ins SrcOp:$src, Int32Regs:$ldm)),
- !if(WithOffset,
- (ins SrcOp:$src, i32imm:$offset),
- (ins SrcOp:$src))),
- "wmma.load."#Abc#".sync."#Layout#".m16n16k16"#Space#"." #Type# " \t"
+ DAGOperand SrcOp, int WithStride>
+ : EmptyNVPTXInst, Requires<[hasPTX60, hasSM70]> {
----------------
Can we make WithStride a bool, or is that not supported?
================
Comment at: llvm/lib/Target/NVPTX/NVPTXIntrinsics.td:7426
+ # !subst(".","_",Space)
+ # !if(WithStride,"_stride", ""));
+ dag OutsR03 = (outs regclass:$r0, regclass:$r1, regclass:$r2, regclass:$r3);
----------------
It's sort of a nit, but: I think I see what you're trying to do with the alignment of `#` under the paren, but it doesn't totally work for me, especially when we add a space *after* the `#`.
Maybe you could just pull the `#`s up onto the line above? Then we don't have any of these issues.
================
Comment at: llvm/lib/Target/NVPTX/NVPTXIntrinsics.td:7505
+
+ //let InOperandList = InsR;
+ let AsmString = "wmma.store.d.sync."#Layout#".m16n16k16"#Space#"." #Type# " \t"
----------------
Dead code?
https://reviews.llvm.org/D43151
More information about the llvm-commits
mailing list