compiler errors - What command line exactly should one use to produce all the records from a <Target>RegisterInfo.td file? -
background things: far have read llvm tutorials, including: the table gen command guide
table gen's general documentation, running tablegen section
i writing code new target llvm, not allowed post here. i'm using x86 target context of question because it's still applicable target.
what trying do: trying use tablegen generate records x86registerinfo.td command line using this:
llvm-tblgen x86registerinfo.td -class=register -i/home/des_fw/fler_llvm/llvm/include
which returns error
x86registerinfo.td:16:43: error: couldn't find class 'register' class x86reg<string n, bits<16> enc, list<register> subregs = []> : register<n> { ^
i able run sample command x86.td given in running tablegen reference above, pretty confident include path -i/.../... correct because without written in way, command doesn't run. running command in same directory, ../target/x86, sample command works.
what correct command use tablegen tool produce records x86registerinfo.td file (or in general xxxregisterinfo.td xxx target name)?
i new llvm , customizing or writing compilers in general, i'm praying it's me not understanding how use command line, if entirely different issue well, tips point me in right direction extremely appreciated.
thank much!
i believe have found answer own question. command line should be
llvm-tblgen x86.td -gen-register-info -i/home/des_fw/fler_llvm/llvm/include
because
"on llvm back-ends, llvm-tblgen binary executed on root tablegen file .td, should include others. guarantees information needed accessible, , no duplication needed in tblegen files." (http://llvm.org/docs/tablegen/backends.html#llvm-backends)
and used the
-gen-register-info
option found @ site mentioned in question: http://llvm.org/docs/commandguide/tblgen.html
so whole command line in general is
llvm-tblgen targetnamehere.td -back-end-opt-for-specific-record-set -i/path/to/file/include/
Comments
Post a Comment