[PATCH] TableGen CGIOperandList should use NumOutOperands instead of NumDefs
Shi, Aaron (en ye) via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 4 08:48:16 PST 2015
Hi Hal,
I have attached a new TableGen.patch correcting bool addToDefs = false; To be named AddToDefs.
Right, this patch deals with the case of NumDefs > NumOutOps.
Also, sorry about the late reply. I’ve been OOO.
Let me know if there is any other changes for this patch submission.
Thanks!
Aaron (En Ye) Shi
PEY, SW Engineering | Stream OpenCL
1 Commerce Valley Dr E, Markham, ON L3T 3X6
O +(1) 289-695-0685 M +(1) 647-709-3020
AMD facebook<https://www.facebook.com/AMD> | amd.com<http://www.amd.com/>
From: Hal Finkel [mailto:hfinkel at anl.gov]
Sent: Tuesday, October 27, 2015 7:33 PM
To: Matt Arsenault <arsenm2 at gmail.com>
Cc: Shi, Aaron (en ye) <Aaronenye.Shi at amd.com>; llvm-commits at lists.llvm.org
Subject: Re: [PATCH] TableGen CGIOperandList should use NumOutOperands instead of NumDefs
________________________________
From: "Matt Arsenault" <arsenm2 at gmail.com<mailto:arsenm2 at gmail.com>>
To: "Hal Finkel" <hfinkel at anl.gov<mailto:hfinkel at anl.gov>>
Cc: "Aaron Shi (en ye)" <Aaronenye.Shi at amd.com<mailto:Aaronenye.Shi at amd.com>>, llvm-commits at lists.llvm.org<mailto:llvm-commits at lists.llvm.org>
Sent: Tuesday, October 27, 2015 6:18:14 PM
Subject: Re: [PATCH] TableGen CGIOperandList should use NumOutOperands instead of NumDefs
On Oct 27, 2015, at 7:08 PM, Hal Finkel via llvm-commits <llvm-commits at lists.llvm.org<mailto:llvm-commits at lists.llvm.org>> wrote:
Hi Aaron,
+ bool addToDefs = false;
This should be named AddToDefs (local variables in LLVM start with a capital letter).
Can you provide a small TableGen snippet showing the kinds of definitions this affects?
Thanks,
Hal
These can be found in HSAILInstrFormats.td (in http://reviews.llvm.org/D9751) in multiclass LD_Types for the multiple result load instructions
Alright, I see this:
multiclass LD_Types<string opName, bits<16> BrigVal> {
def _S8 : LD<opName, BrigVal, (outs GPR32:$dest)>,
LdStVectorMap<NAME#"_S8", 1>;
def _U8 : LD<opName, BrigVal, (outs GPR32:$dest)>,
LdStVectorMap<NAME#"_U8", 1>;
...
def _V2_S8 : LD<opName#"_v2", BrigVal, (outs Vec2DestOp32:$dest)>,
LdStVectorMap<NAME#"_S8", 2>;
def _V2_U8 : LD<opName#"_v2", BrigVal, (outs Vec2DestOp32:$dest)>,
LdStVectorMap<NAME#"_U8", 2>;
...
and these have one element in their 'outs' list. However, these vector operands are actually complex operands:
def Vec2DestOp32 : Operand<untyped> {
let MIOperandInfo = (ops HSAILDest32Operand, HSAILDest32Operand);
let PrintMethod = "printVec2Op";
}
So this patch deals with the case where NumDefs > NumOutOps. That makes sense.
-Hal
--
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151104/aebd5afb/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TableGen.patch
Type: application/octet-stream
Size: 4834 bytes
Desc: TableGen.patch
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151104/aebd5afb/attachment.obj>
More information about the llvm-commits
mailing list