Background things: Thus far I have read from the llvm tutorials, including: The Table Gen Command Guide
Table Gen's General Documentation, especially the Running TableGen section
I am currently writing code for a new target for llvm, which I am not allowed to post here. I'm using the X86 Target for the context of my question because it's still applicable to that target.
What I am trying to do: I am trying to use tablegen to generate the records from X86RegisterInfo.td The command line I am using is this:
llvm-tblgen X86RegisterInfo.td -class=Register -I/home/des_fw/fler_llvm/llvm/include
which returns this error
X86RegisterInfo.td:16:43: error: Couldn't find class 'Register'
class X86Reg<string n, bits<16> Enc, list<Register> subregs = []> : Register<n> {
^
I was able to run the sample command for X86.td given in the Running TableGen reference above, so I am pretty confident that the include path -I/.../... is correct because without it written in this way, the command doesn't run. I am also running my command in the same directory, the ../Target/X86, as the sample command that works.
What is the correct command to use so that the TableGen tool will produce the records for the X86RegisterInfo.td file (or in general for XXXRegisterInfo.td where XXX is the target name)?
I am very new to LLVM and customizing or writing compilers in general, so I'm praying it's just me not understanding how to use the command line, but if it could be an entirely different issue as well, any tips to point me in the right direction are all extremely appreciated.
Thank you very much!