Paoc
Overview
Paoc is an application to launch compiler on panda binary files.
There are three modes of paoc:
AOT-mode(default) - compile the files and produce an executable;JIT-mode- only run compiler (IR builder, optimizations) without generating an executable. This may be usefull, for example, to get--compiler-dumpor to ensure that all of the compiler passes are applied correctly.OSR-mode- similiar toJIT-mode. Takes into account differences of OSR compilation.
Paoc options
Common options
--paoc-panda-files
- Comma-separated list of panda files to compile.
This is a mandatory option.
--compiler-ignore-failures
- A boolean option that allows to continue the compilation if some of the methods are failed to compile.
Default istrue.
--paoc-mode
- A string that specifies paoc's mode.
Possible values:aot(default)jitosr
AOT-specific options
--paoc-output
- Output file path.
Default isout.an.
--paoc-arch
- Target architecture for output file.
Possible values:armarm64(default)x86x86_64
--paoc-location
- Location path of the input panda file, that will be written into the AOT file.
--paoc-generate-symbols
- Generate symbols for compiled methods (always true in debug builds).
Default isfalse.
Selection options
The following options allow to specify methods to compile.
If none of them are specified, paoc will compile every method from --paoc-panda-files.
--paoc-methods-from-file
- Path to a file which contains full names of methods to compile.
--paoc-skip-until
- Set first method to complie and skip all previous.
--paoc-compile-until
- Set last method to complie and skip all following.
Cluster compiler options
paoc has an option to apply clusters of special compiler options (different from default and passed via command line) to specified methods:
--paoc-clusters
- A path to
.jsonconfig file of the following format:
{
# The file should contain two objects: "clusters_map", which describes `function-clusters` relations,
# and "compiler_options", which defines clusters themselves (`option:argument` pairs).
"clusters_map" :
# Keys are functions' full names (i.e. `class::method`).
# Values are arrays whose elements should be a name of a cluster or it's index (starting from 0).
# If some of the options are intersecting, the last (in the array) would be applied.
{
"class::function_1" : [1],
"class::function_2" : [0, "cluster_1", 2],
"class::function_3" : ["cluster_0", 1, 2], # same as previous
"class::function_4" : ["cluster_0", 2, 3] # "cluster_3" overlaps "cluster_2" by "compiler_option_2".
},
"compiler_options" :
# Keys are clusters' names.
# Values are objects with `"option": argument` elements.
{
# [0]
"cluster_0" :
{
"compiler_option_1" : "arg",
"compiler_option_2" : "arg",
"compiler_option_3" : "arg"
},
# [1]
"cluster_1" :
{
"compiler_option_1" : "arg"
},
# [2]
"cluster_2" :
{
"compiler_option_1" : "arg",
"compiler_option_2" : "arg"
},
# [3]
"cluster_3" :
{
"compiler_option_2" : "arg"
}
}
}