[LLVMdev] tablegen question

Micah Villmow micah.villmow at smachines.com
Wed Aug 7 01:50:09 PDT 2013


Why not just run the c preprocessor before running tablegen?

Micah

> -----Original Message-----
> From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu]
> On Behalf Of Jeroen Dobbelaere
> Sent: Wednesday, August 07, 2013 1:33 AM
> To: llvmdev at cs.uiuc.edu
> Subject: [LLVMdev] tablegen question
> 
> Hi,
> 
> I am trying to make my tablegen files more flexible and for that I would like
> to have a name that in the end will be replaced with a type.
> 
> If tablegen would support c preprocssing, I would do it like this:
> 
> ---
> #define myBaseType  i32
> ...
> def imm32 : Operand<myBaseType>;
> def immZExt10 : ImmLeaf<myBaseType, [{return isUInt<10>(Imm);}]>; ...
> ---
> 
> Is there a way to achieve something like this with tablegen ?
> 
> Greetings,
> 
> Jeroen Dobbelaere
> 
> 
> 
> 
> 
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list