Possible to add a test case? Micah> -----Original Message----- > From: Sebastian Pop [mailto:spop at codeaurora.org] > Sent: Wednesday, June 20, 2012 1:40 PM > To: Villmow, Micah > Cc: llvmdev at cs.uiuc.edu; llvm-commits at cs.uiuc.edu > Subject: Re: [LLVMdev] How to define macros in a tablegen file? > > On Wed, Jun 20, 2012 at 12:34 PM, Sebastian Pop <spop at codeaurora.org> > wrote: > > On Wed, Jun 20, 2012 at 12:26 PM, Sebastian Pop <spop at codeaurora.org> > wrote: > >> For reference, here is how the SPU port is using code and pattern > fragments: > >> > >> // Holder of code fragments (you'd think this'd already be in // a > td > >> file somewhere... :-) > > > > And this comment makes me think, shouldn't this class CodeFrag be > > included in the same place where PatFrag is declared: > > > > ./include/llvm/Target/TargetSelectionDAG.td:544:class PatFrag<dag > ops, > > dag frag, code pred = [{}], > > > > such that we get it included through "llvm/Target/Target.td"? > > > > I will prepare a patch for this. > > > > Please see the attached patch. Ok to commit? > > Thanks, > Sebastian > -- > Qualcomm Innovation Center, Inc is a member of Code Aurora Forum
Sebastian Pop
2012-Jun-20 21:02 UTC
[LLVMdev] [llvm-commits] How to define macros in a tablegen file?
On Wed, Jun 20, 2012 at 3:40 PM, Villmow, Micah <Micah.Villmow at amd.com> wrote:> Possible to add a test case?I am not really sure what I would check. At first, I thought to add a testcase to test/TableGen; as this patch does not modify tablegen, it doesn't make sense. What kind of test should I write for this? The test should be a tablegen file that includes "llvm/Target/TargetSelectionDAG.td" or "llvm/Target/Target.td", and I haven't seen any of these in the testsuite. Sebastian -- Qualcomm Innovation Center, Inc is a member of Code Aurora Forum
Villmow, Micah
2012-Jun-20 21:43 UTC
[LLVMdev] [llvm-commits] How to define macros in a tablegen file?
Ok, I was thinking there might be a test similar to PatFrag that could be created, but I noticed there are no tests for PatFrag either. So that patch looks fine to me. Micah> -----Original Message----- > From: Sebastian Pop [mailto:spop at codeaurora.org] > Sent: Wednesday, June 20, 2012 2:02 PM > To: Villmow, Micah > Cc: llvm-commits at cs.uiuc.edu; llvmdev at cs.uiuc.edu > Subject: Re: [llvm-commits] [LLVMdev] How to define macros in a > tablegen file? > > On Wed, Jun 20, 2012 at 3:40 PM, Villmow, Micah <Micah.Villmow at amd.com> > wrote: > > Possible to add a test case? > > I am not really sure what I would check. > > At first, I thought to add a testcase to test/TableGen; as this patch > does not modify tablegen, it doesn't make sense. > > What kind of test should I write for this? The test should be a > tablegen file that includes "llvm/Target/TargetSelectionDAG.td" or > "llvm/Target/Target.td", and I haven't seen any of these in the > testsuite. > > Sebastian > -- > Qualcomm Innovation Center, Inc is a member of Code Aurora Forum
Evandro Menezes
2012-Jun-21 15:31 UTC
[LLVMdev] [llvm-commits] How to define macros in a tablegen file?
Sebastian, If not a test, how about a patch in the documentation for TableGen about this new feature that you're making available? -- Evandro Menezes Austin, TX emenezes at codeaurora.org Qualcomm Innovation Center, Inc is a member of the Code Aurora Forum On 06/20/12 16:02, Sebastian Pop wrote:> On Wed, Jun 20, 2012 at 3:40 PM, Villmow, Micah<Micah.Villmow at amd.com> wrote: >> Possible to add a test case? > > I am not really sure what I would check. > > At first, I thought to add a testcase to test/TableGen; as this patch > does not modify tablegen, it doesn't make sense. > > What kind of test should I write for this? The test should be a > tablegen file that includes "llvm/Target/TargetSelectionDAG.td" or > "llvm/Target/Target.td", and I haven't seen any of these in the > testsuite. > > Sebastian