lli.rst 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  1. lli - directly execute programs from LLVM bitcode
  2. =================================================
  3. SYNOPSIS
  4. --------
  5. **lli** [*options*] [*filename*] [*program args*]
  6. DESCRIPTION
  7. -----------
  8. **lli** directly executes programs in LLVM bitcode format. It takes a program
  9. in LLVM bitcode format and executes it using a just-in-time compiler, if one is
  10. available for the current architecture, or an interpreter. **lli** takes all of
  11. the same code generator options as llc|llc, but they are only effective when
  12. **lli** is using the just-in-time compiler.
  13. If *filename* is not specified, then **lli** reads the LLVM bitcode for the
  14. program from standard input.
  15. The optional *args* specified on the command line are passed to the program as
  16. arguments.
  17. GENERAL OPTIONS
  18. ---------------
  19. **-fake-argv0**\ =\ *executable*
  20. Override the ``argv[0]`` value passed into the executing program.
  21. **-force-interpreter**\ =\ *{false,true}*
  22. If set to true, use the interpreter even if a just-in-time compiler is available
  23. for this architecture. Defaults to false.
  24. **-help**
  25. Print a summary of command line options.
  26. **-load**\ =\ *pluginfilename*
  27. Causes **lli** to load the plugin (shared object) named *pluginfilename* and use
  28. it for optimization.
  29. **-stats**
  30. Print statistics from the code-generation passes. This is only meaningful for
  31. the just-in-time compiler, at present.
  32. **-time-passes**
  33. Record the amount of time needed for each code-generation pass and print it to
  34. standard error.
  35. **-version**
  36. Print out the version of **lli** and exit without doing anything else.
  37. TARGET OPTIONS
  38. --------------
  39. **-mtriple**\ =\ *target triple*
  40. Override the target triple specified in the input bitcode file with the
  41. specified string. This may result in a crash if you pick an
  42. architecture which is not compatible with the current system.
  43. **-march**\ =\ *arch*
  44. Specify the architecture for which to generate assembly, overriding the target
  45. encoded in the bitcode file. See the output of **llc -help** for a list of
  46. valid architectures. By default this is inferred from the target triple or
  47. autodetected to the current architecture.
  48. **-mcpu**\ =\ *cpuname*
  49. Specify a specific chip in the current architecture to generate code for.
  50. By default this is inferred from the target triple and autodetected to
  51. the current architecture. For a list of available CPUs, use:
  52. **llvm-as < /dev/null | llc -march=xyz -mcpu=help**
  53. **-mattr**\ =\ *a1,+a2,-a3,...*
  54. Override or control specific attributes of the target, such as whether SIMD
  55. operations are enabled or not. The default set of attributes is set by the
  56. current CPU. For a list of available attributes, use:
  57. **llvm-as < /dev/null | llc -march=xyz -mattr=help**
  58. FLOATING POINT OPTIONS
  59. ----------------------
  60. **-disable-excess-fp-precision**
  61. Disable optimizations that may increase floating point precision.
  62. **-enable-no-infs-fp-math**
  63. Enable optimizations that assume no Inf values.
  64. **-enable-no-nans-fp-math**
  65. Enable optimizations that assume no NAN values.
  66. **-enable-unsafe-fp-math**
  67. Causes **lli** to enable optimizations that may decrease floating point
  68. precision.
  69. **-soft-float**
  70. Causes **lli** to generate software floating point library calls instead of
  71. equivalent hardware instructions.
  72. CODE GENERATION OPTIONS
  73. -----------------------
  74. **-code-model**\ =\ *model*
  75. Choose the code model from:
  76. .. code-block:: perl
  77. default: Target default code model
  78. small: Small code model
  79. kernel: Kernel code model
  80. medium: Medium code model
  81. large: Large code model
  82. **-disable-post-RA-scheduler**
  83. Disable scheduling after register allocation.
  84. **-disable-spill-fusing**
  85. Disable fusing of spill code into instructions.
  86. **-jit-enable-eh**
  87. Exception handling should be enabled in the just-in-time compiler.
  88. **-join-liveintervals**
  89. Coalesce copies (default=true).
  90. **-nozero-initialized-in-bss** Don't place zero-initialized symbols into the BSS section.
  91. **-pre-RA-sched**\ =\ *scheduler*
  92. Instruction schedulers available (before register allocation):
  93. .. code-block:: perl
  94. =default: Best scheduler for the target
  95. =none: No scheduling: breadth first sequencing
  96. =simple: Simple two pass scheduling: minimize critical path and maximize processor utilization
  97. =simple-noitin: Simple two pass scheduling: Same as simple except using generic latency
  98. =list-burr: Bottom-up register reduction list scheduling
  99. =list-tdrr: Top-down register reduction list scheduling
  100. =list-td: Top-down list scheduler -print-machineinstrs - Print generated machine code
  101. **-regalloc**\ =\ *allocator*
  102. Register allocator to use (default=linearscan)
  103. .. code-block:: perl
  104. =bigblock: Big-block register allocator
  105. =linearscan: linear scan register allocator =local - local register allocator
  106. =simple: simple register allocator
  107. **-relocation-model**\ =\ *model*
  108. Choose relocation model from:
  109. .. code-block:: perl
  110. =default: Target default relocation model
  111. =static: Non-relocatable code =pic - Fully relocatable, position independent code
  112. =dynamic-no-pic: Relocatable external references, non-relocatable code
  113. **-spiller**
  114. Spiller to use (default=local)
  115. .. code-block:: perl
  116. =simple: simple spiller
  117. =local: local spiller
  118. **-x86-asm-syntax**\ =\ *syntax*
  119. Choose style of code to emit from X86 backend:
  120. .. code-block:: perl
  121. =att: Emit AT&T-style assembly
  122. =intel: Emit Intel-style assembly
  123. EXIT STATUS
  124. -----------
  125. If **lli** fails to load the program, it will exit with an exit code of 1.
  126. Otherwise, it will return the exit code of the program it executes.
  127. SEE ALSO
  128. --------
  129. llc|llc