[llvm-commits] An addition operator for TableGen
Jakob Stoklund Olesen
stoklund at 2pi.dk
Fri Jan 25 10:24:48 PST 2013
On Jan 25, 2013, at 9:40 AM, Hal Finkel <hfinkel at anl.gov> wrote:
> ----- 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.
A bit of grepping suggests that the shift operators could just be deleted along with !head and !tail.
> Is there a good reason why we should not add infix operator parsing?
I am not aware of one.
/jakob
More information about the llvm-commits
mailing list