109467b48Spatricklli - directly execute programs from LLVM bitcode 209467b48Spatrick================================================= 309467b48Spatrick 409467b48Spatrick.. program:: lli 509467b48Spatrick 609467b48SpatrickSYNOPSIS 709467b48Spatrick-------- 809467b48Spatrick 909467b48Spatrick:program:`lli` [*options*] [*filename*] [*program args*] 1009467b48Spatrick 1109467b48SpatrickDESCRIPTION 1209467b48Spatrick----------- 1309467b48Spatrick 1409467b48Spatrick:program:`lli` directly executes programs in LLVM bitcode format. It takes a program 1509467b48Spatrickin LLVM bitcode format and executes it using a just-in-time compiler or an 1609467b48Spatrickinterpreter. 1709467b48Spatrick 1809467b48Spatrick:program:`lli` is *not* an emulator. It will not execute IR of different architectures 1909467b48Spatrickand it can only interpret (or JIT-compile) for the host architecture. 2009467b48Spatrick 2109467b48SpatrickThe JIT compiler takes the same arguments as other tools, like :program:`llc`, 2209467b48Spatrickbut they don't necessarily work for the interpreter. 2309467b48Spatrick 2409467b48SpatrickIf `filename` is not specified, then :program:`lli` reads the LLVM bitcode for the 2509467b48Spatrickprogram from standard input. 2609467b48Spatrick 2709467b48SpatrickThe optional *args* specified on the command line are passed to the program as 2809467b48Spatrickarguments. 2909467b48Spatrick 3009467b48SpatrickGENERAL OPTIONS 3109467b48Spatrick--------------- 3209467b48Spatrick 3309467b48Spatrick.. option:: -fake-argv0=executable 3409467b48Spatrick 3509467b48Spatrick Override the ``argv[0]`` value passed into the executing program. 3609467b48Spatrick 3709467b48Spatrick.. option:: -force-interpreter={false,true} 3809467b48Spatrick 3909467b48Spatrick If set to true, use the interpreter even if a just-in-time compiler is available 4009467b48Spatrick for this architecture. Defaults to false. 4109467b48Spatrick 4209467b48Spatrick.. option:: -help 4309467b48Spatrick 4409467b48Spatrick Print a summary of command line options. 4509467b48Spatrick 4609467b48Spatrick.. option:: -load=pluginfilename 4709467b48Spatrick 4809467b48Spatrick Causes :program:`lli` to load the plugin (shared object) named *pluginfilename* and use 4909467b48Spatrick it for optimization. 5009467b48Spatrick 5109467b48Spatrick.. option:: -stats 5209467b48Spatrick 5309467b48Spatrick Print statistics from the code-generation passes. This is only meaningful for 5409467b48Spatrick the just-in-time compiler, at present. 5509467b48Spatrick 5609467b48Spatrick.. option:: -time-passes 5709467b48Spatrick 5809467b48Spatrick Record the amount of time needed for each code-generation pass and print it to 5909467b48Spatrick standard error. 6009467b48Spatrick 6109467b48Spatrick.. option:: -version 6209467b48Spatrick 6309467b48Spatrick Print out the version of :program:`lli` and exit without doing anything else. 6409467b48Spatrick 6509467b48SpatrickTARGET OPTIONS 6609467b48Spatrick-------------- 6709467b48Spatrick 6809467b48Spatrick.. option:: -mtriple=target triple 6909467b48Spatrick 7009467b48Spatrick Override the target triple specified in the input bitcode file with the 7109467b48Spatrick specified string. This may result in a crash if you pick an 7209467b48Spatrick architecture which is not compatible with the current system. 7309467b48Spatrick 7409467b48Spatrick.. option:: -march=arch 7509467b48Spatrick 7609467b48Spatrick Specify the architecture for which to generate assembly, overriding the target 7709467b48Spatrick encoded in the bitcode file. See the output of **llc -help** for a list of 7809467b48Spatrick valid architectures. By default this is inferred from the target triple or 7909467b48Spatrick autodetected to the current architecture. 8009467b48Spatrick 8109467b48Spatrick.. option:: -mcpu=cpuname 8209467b48Spatrick 8309467b48Spatrick Specify a specific chip in the current architecture to generate code for. 8409467b48Spatrick By default this is inferred from the target triple and autodetected to 8509467b48Spatrick the current architecture. For a list of available CPUs, use: 8609467b48Spatrick **llvm-as < /dev/null | llc -march=xyz -mcpu=help** 8709467b48Spatrick 8809467b48Spatrick.. option:: -mattr=a1,+a2,-a3,... 8909467b48Spatrick 9009467b48Spatrick Override or control specific attributes of the target, such as whether SIMD 9109467b48Spatrick operations are enabled or not. The default set of attributes is set by the 9209467b48Spatrick current CPU. For a list of available attributes, use: 9309467b48Spatrick **llvm-as < /dev/null | llc -march=xyz -mattr=help** 9409467b48Spatrick 9509467b48SpatrickFLOATING POINT OPTIONS 9609467b48Spatrick---------------------- 9709467b48Spatrick 9809467b48Spatrick.. option:: -disable-excess-fp-precision 9909467b48Spatrick 10009467b48Spatrick Disable optimizations that may increase floating point precision. 10109467b48Spatrick 10209467b48Spatrick.. option:: -enable-no-infs-fp-math 10309467b48Spatrick 10409467b48Spatrick Enable optimizations that assume no Inf values. 10509467b48Spatrick 10609467b48Spatrick.. option:: -enable-no-nans-fp-math 10709467b48Spatrick 10809467b48Spatrick Enable optimizations that assume no NAN values. 10909467b48Spatrick 11009467b48Spatrick.. option:: -enable-unsafe-fp-math 11109467b48Spatrick 11209467b48Spatrick Causes :program:`lli` to enable optimizations that may decrease floating point 11309467b48Spatrick precision. 11409467b48Spatrick 11509467b48Spatrick.. option:: -soft-float 11609467b48Spatrick 11709467b48Spatrick Causes :program:`lli` to generate software floating point library calls instead of 11809467b48Spatrick equivalent hardware instructions. 11909467b48Spatrick 12009467b48SpatrickCODE GENERATION OPTIONS 12109467b48Spatrick----------------------- 12209467b48Spatrick 12309467b48Spatrick.. option:: -code-model=model 12409467b48Spatrick 12509467b48Spatrick Choose the code model from: 12609467b48Spatrick 12709467b48Spatrick .. code-block:: text 12809467b48Spatrick 12909467b48Spatrick default: Target default code model 13009467b48Spatrick tiny: Tiny code model 13109467b48Spatrick small: Small code model 13209467b48Spatrick kernel: Kernel code model 13309467b48Spatrick medium: Medium code model 13409467b48Spatrick large: Large code model 13509467b48Spatrick 13609467b48Spatrick.. option:: -disable-post-RA-scheduler 13709467b48Spatrick 13809467b48Spatrick Disable scheduling after register allocation. 13909467b48Spatrick 14009467b48Spatrick.. option:: -disable-spill-fusing 14109467b48Spatrick 14209467b48Spatrick Disable fusing of spill code into instructions. 14309467b48Spatrick 14409467b48Spatrick.. option:: -jit-enable-eh 14509467b48Spatrick 14609467b48Spatrick Exception handling should be enabled in the just-in-time compiler. 14709467b48Spatrick 14809467b48Spatrick.. option:: -join-liveintervals 14909467b48Spatrick 15009467b48Spatrick Coalesce copies (default=true). 15109467b48Spatrick 15209467b48Spatrick.. option:: -nozero-initialized-in-bss 15309467b48Spatrick 15409467b48Spatrick Don't place zero-initialized symbols into the BSS section. 15509467b48Spatrick 15609467b48Spatrick.. option:: -pre-RA-sched=scheduler 15709467b48Spatrick 15809467b48Spatrick Instruction schedulers available (before register allocation): 15909467b48Spatrick 16009467b48Spatrick .. code-block:: text 16109467b48Spatrick 16209467b48Spatrick =default: Best scheduler for the target 16309467b48Spatrick =none: No scheduling: breadth first sequencing 16409467b48Spatrick =simple: Simple two pass scheduling: minimize critical path and maximize processor utilization 16509467b48Spatrick =simple-noitin: Simple two pass scheduling: Same as simple except using generic latency 16609467b48Spatrick =list-burr: Bottom-up register reduction list scheduling 16709467b48Spatrick =list-tdrr: Top-down register reduction list scheduling 16873471bf0Spatrick =list-td: Top-down list scheduler 16909467b48Spatrick 17009467b48Spatrick.. option:: -regalloc=allocator 17109467b48Spatrick 17209467b48Spatrick Register allocator to use (default=linearscan) 17309467b48Spatrick 17409467b48Spatrick .. code-block:: text 17509467b48Spatrick 17609467b48Spatrick =bigblock: Big-block register allocator 177*d415bd75Srobert =linearscan: linear scan register allocator 178*d415bd75Srobert =local: local register allocator 17909467b48Spatrick =simple: simple register allocator 18009467b48Spatrick 18109467b48Spatrick.. option:: -relocation-model=model 18209467b48Spatrick 18309467b48Spatrick Choose relocation model from: 18409467b48Spatrick 18509467b48Spatrick .. code-block:: text 18609467b48Spatrick 18709467b48Spatrick =default: Target default relocation model 188*d415bd75Srobert =static: Non-relocatable code 189*d415bd75Srobert =pic: Fully relocatable, position independent code 19009467b48Spatrick =dynamic-no-pic: Relocatable external references, non-relocatable code 19109467b48Spatrick 19209467b48Spatrick.. option:: -spiller 19309467b48Spatrick 19409467b48Spatrick Spiller to use (default=local) 19509467b48Spatrick 19609467b48Spatrick .. code-block:: text 19709467b48Spatrick 19809467b48Spatrick =simple: simple spiller 19909467b48Spatrick =local: local spiller 20009467b48Spatrick 20109467b48Spatrick.. option:: -x86-asm-syntax=syntax 20209467b48Spatrick 20309467b48Spatrick Choose style of code to emit from X86 backend: 20409467b48Spatrick 20509467b48Spatrick .. code-block:: text 20609467b48Spatrick 20709467b48Spatrick =att: Emit AT&T-style assembly 20809467b48Spatrick =intel: Emit Intel-style assembly 20909467b48Spatrick 21009467b48SpatrickEXIT STATUS 21109467b48Spatrick----------- 21209467b48Spatrick 21309467b48SpatrickIf :program:`lli` fails to load the program, it will exit with an exit code of 1. 21409467b48SpatrickOtherwise, it will return the exit code of the program it executes. 21509467b48Spatrick 21609467b48SpatrickSEE ALSO 21709467b48Spatrick-------- 21809467b48Spatrick 21909467b48Spatrick:manpage:`llc(1)` 220