tblgen.rst 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. tblgen - Target Description To C++ Code Generator
  2. =================================================
  3. .. program:: tblgen
  4. SYNOPSIS
  5. --------
  6. :program:`tblgen` [*options*] [*filename*]
  7. DESCRIPTION
  8. -----------
  9. :program:`tblgen` translates from target description (``.td``) files into C++
  10. code that can be included in the definition of an LLVM target library. Most
  11. users of LLVM will not need to use this program. It is only for assisting with
  12. writing an LLVM target backend.
  13. The input and output of :program:`tblgen` is beyond the scope of this short
  14. introduction; please see the :doc:`introduction to TableGen
  15. <../TableGen/index>`.
  16. The *filename* argument specifies the name of a Target Description (``.td``)
  17. file to read as input.
  18. OPTIONS
  19. -------
  20. .. program:: tblgen
  21. .. option:: -help
  22. Print a summary of command line options.
  23. .. option:: -o filename
  24. Specify the output file name. If ``filename`` is ``-``, then
  25. :program:`tblgen` sends its output to standard output.
  26. .. option:: -I directory
  27. Specify where to find other target description files for inclusion. The
  28. ``directory`` value should be a full or partial path to a directory that
  29. contains target description files.
  30. .. option:: -asmparsernum N
  31. Make -gen-asm-parser emit assembly writer number ``N``.
  32. .. option:: -asmwriternum N
  33. Make -gen-asm-writer emit assembly writer number ``N``.
  34. .. option:: -class className
  35. Print the enumeration list for this class.
  36. .. option:: -print-records
  37. Print all records to standard output (default).
  38. .. option:: -dump-json
  39. Print a JSON representation of all records, suitable for further
  40. automated processing.
  41. .. option:: -print-enums
  42. Print enumeration values for a class.
  43. .. option:: -print-sets
  44. Print expanded sets for testing DAG exprs.
  45. .. option:: -gen-emitter
  46. Generate machine code emitter.
  47. .. option:: -gen-register-info
  48. Generate registers and register classes info.
  49. .. option:: -gen-instr-info
  50. Generate instruction descriptions.
  51. .. option:: -gen-asm-writer
  52. Generate the assembly writer.
  53. .. option:: -gen-disassembler
  54. Generate disassembler.
  55. .. option:: -gen-pseudo-lowering
  56. Generate pseudo instruction lowering.
  57. .. option:: -gen-dag-isel
  58. Generate a DAG (Directed Acycle Graph) instruction selector.
  59. .. option:: -gen-asm-matcher
  60. Generate assembly instruction matcher.
  61. .. option:: -gen-dfa-packetizer
  62. Generate DFA Packetizer for VLIW targets.
  63. .. option:: -gen-fast-isel
  64. Generate a "fast" instruction selector.
  65. .. option:: -gen-subtarget
  66. Generate subtarget enumerations.
  67. .. option:: -gen-intrinsic-enums
  68. Generate intrinsic enums.
  69. .. option:: -gen-intrinsic-impl
  70. Generate intrinsic implementation.
  71. .. option:: -gen-tgt-intrinsic
  72. Generate target intrinsic information.
  73. .. option:: -gen-enhanced-disassembly-info
  74. Generate enhanced disassembly info.
  75. .. option:: -gen-exegesis
  76. Generate llvm-exegesis tables.
  77. .. option:: -version
  78. Show the version number of this program.
  79. EXIT STATUS
  80. -----------
  81. If :program:`tblgen` succeeds, it will exit with 0. Otherwise, if an error
  82. occurs, it will exit with a non-zero value.