[llvm-commits] An addition operator for TableGen

Hal Finkel hfinkel at anl.gov
Fri Jan 25 09:40:24 PST 2013


----- Original Message -----
> From: "Jakob Stoklund Olesen" <stoklund at 2pi.dk>
> To: "Hal Finkel" <hfinkel at anl.gov>
> Cc: "llvm-commits at cs.uiuc.edu commits" <llvm-commits at cs.uiuc.edu>
> Sent: Friday, January 25, 2013 11:33:35 AM
> Subject: Re: [llvm-commits] An addition operator for TableGen
> 
> 
> On Jan 24, 2013, at 4:57 PM, Hal Finkel <hfinkel at anl.gov> wrote:
> 
> > Hello again,
> > 
> > Please review the attached patch which adds an addition operator
> > !add(a, b) to TableGen. I'd like to use this to cleanup the PPC
> > register definitions (associated patch also attached). This patch
> > is based on David Greene's !mul proposal.
> 
> Hi Hal,
> 
> I think it is great to add expressions to TableGen, but as Sean
> pointed out, the syntax proposed here is really gross.
> 
> Surely a gaggle of compiler engineers can do better!

I agree; but I think the two issues are somewhat separate. I think we should improve the addition operator, and also the shift operators, while also adding subtraction and multiplication (and if someone has a use, perhaps also division) with some better syntax. Is there a good reason why we should not add infix operator parsing?

Thanks again,
Hal

> 
> /jakob
> 
> 



More information about the llvm-commits mailing list