Next: Errors, Up: Implementation [Contents]
tc
Synopsis:
tc option… file
where file can be ‘-’, denoting the standard input.
Global options are:
Display the help message, and exit successfully.
Display the version, and exit successfully.
List the registered tasks.
Report the order in which the tasks will be run.
The options related to the file library (TC-1) are:
Prepend a directory to include path.
Append a directory to include path.
Report the include search path.
The options related to scanning and parsing (TC-1) are:
Enable Flex scanners traces.
Enable Bison parsers traces.
Parse the file given as argument (objects forbidden).
Load the definitions of the file prelude before the actual argument. The result is equivalent to parsing:
let import "prelude" in /* The argument file. */ end
To disable any prelude file, use no-prelude. The default
value is builtin
, denoting the builtin prelude.
Don’t include prelude.
The options related to the AST (TC-2) are:
Enable object constructs of the language (class and method declarations, object creation, method calls, etc.).
Same as --object --parse, i.e. parse the file given as argument, allowing objects.
Display the AST.
Reclaim the memory allocated for the AST.
The options related to escapes computation (TC-3) are:
Make sure bindings (regular or taking overloading or objects constructs into account) are computed.
Bind the name uses to their definitions (objects forbidden).
Enable the bindings display in the next --ast-display invocation. This option does not imply --bindings-compute.
Bind the name uses to their definitions, allowing objects. consistency.
The options related to the renaming to unique identifiers (TC-R) are:
Rename identifiers (objects forbidden).
The options related to escapes computation (TC-E) are:
Compute the escapes.
Enable the escape display. This option does not imply --escapes-compute, so that it is possible to check that the defaults (everybody escapes) are properly implemented. Pass -A afterward to see its result.
The options related to type checking (TC-4) are:
Make sure types (regular or taking overloading or objects constructs into account) are computed.
Compute and check (regular) types (objects forbidden).
Compute and check (regular) types, allowing objects.
The options related to desugaring (TC-D) are:
Enable the translation of for
loops into while
loops.
Enable the desugaring of string comparisons.
Make sure syntactic sugar (regular or taking overloading into account) has been removed from the AST.
Remove syntactic sugar from the AST. Desired translations must be enabled beforehand (e.g. with --desugar-for or --desugar-string-cmp).
Like --desugar but with support for overloaded functions (see TC-A).
The options related to the inlining optimization (TC-I) are:
Inline bodies of (non overloaded) functions at call sites.
Inline bodies of functions (overloaded or not) at call sites.
Remove unused (non overloaded) functions.
Remove unused functions (overloaded or not).
The options related to the bounds checking instrumentation (TC-B) are:
Add dynamic bounds checks.
Add dynamic bounds checks, with support for overloading.
The options related to overloading support (TC-A) are:
Binding variables, types, and breaks as usual, by bind function calls to the set of function definitions baring the same name.
Type-check and resolve (bind) overloaded function calls. Implies --overfun-bindings-compute.
The options related to the desugaring of object constructs (TC-O) are:
Translate object constructs from the program into their non object counterparts, i.e., transform a Tiger program into a Panther one.
The options related to the high level intermediate representation (TC-5) are:
Translate to HIR (objects forbidden). Implies --typed.
Display the high level intermediate representation. Implies --hir-compute.
The options related to the LLVM IR translation (TC-L) are:
Translate to LLVM IR.
Enable runtime displaying along with the LLVM IR.
Display the LLVM IR.
The options related to the low level intermediate representation (TC-6) are:
Trace the canonicalization of HIR to LIR.
Canonicalize the LIR fragments.
Display the canonicalized intermediate representation before basic blocks and traces computation. Implies --lir-compute. It is convenient to determine whether a failure is due to canonicalization, or traces.
Trace the basic blocks and traces canonicalization of HIR to LIR.
Compute the basic blocks from canonicalized HIR fragments. Implies --canon-compute.
Translate to LIR. Implies --traces-compute. Actually, it is nothing but a nice looking alias for the latter.
Display the low level intermediate representation. Implies --lir-compute.
The options related to the instruction selection (TC-7) are:
Convert from LIR to pseudo assembly with temporaries. Implies --lir-compute.
Display the pseudo assembly, (without the runtime prologue). Implies --inst-compute.
Display the assembly runtime prologue for the current target.
The options related to the liveness information (TC-8) are:
Save each function flow graph in a Graphviz file. Implies --inst-compute.
Save each function flow graph enriched with liveness information in a Graphviz file. Implies --inst-compute.
Save each function interference graph in a Graphviz file. Implies --inst-compute.
The options related to the target are:
Set the maximum number of callee/caller save registers to num, a positive number. Note that (currently) this does not reset the current target, hence to actually change the behavior, one needs ‘--callee-save=0 --target-mips’.
Set the target to Mips.
This optional flag sets the target to IA-32.
If no target is selected, select Mips. This option is triggered by all the options that need a target.
Report information about the current target.
The options related to the register allocation are:
Disable coalescence.
Trace register allocation.
Allocate the registers.
Display the final assembler, runtime included.
Next: Errors, Up: Implementation [Contents]