The CC backend for the Perl compiler. Generates optimized C source code that corresponds to your program's flow. The initial version included in Perl 5.005 actually includes few optimizations, but this will change. Programs compiled with this backend may both start up and execute slightly faster. Invoke as:
whereperl -MO=C[,options] program
program
is the name of the Perl script to compile. Any non-option
arguments are treated as the names of objects to be saved; the main
program is assumed if there are no extra arguments. Possible options are:Forces end of options.
Debug options, which can be either concatenated or specified separately. Possible options are:
l
Outputs the filename and line number of each original line of Perl code as it is processed.
O
Outputs each OP as it is compiled.
p
Outputs the contents of the shadow pad of lexicals as it is loaded for each sub or for the main program.
q
Outputs the name of each fake PP function in the queue as it's about to be processed.
r
Writes debugging output to STDERR instead of as comments in the C output.
s
Outputs the contents of the shadow stack at each OP.
t
Outputs timing information of the stages of compilation.
Forces individual optimizations on or off. Possible values of opt are:
freetmps-each-bblock
Runs FREETMPS at the end of each basic block instead of at the end of each
statement. freetmps-each-loop
and freetmps-each-bblock
are
mutually exclusive.
freetmps-each-loop
Runs FREETMPS at the end of each loop instead of at the end of each statement.
freetmps-each-loop
and freetmps-each-bblock
are
mutually exclusive.
omit-taint
Doesn't generate code for handling Perl's tainting mechanism.
Generates source for an XSUB module instead of for an executable.
Sends output to filename instead of to STDOUT.
n
]Sets optimization level, where n is an integer. n defaults to 1.
Currently, -O1
sets -ffreetmps-each-bblock
, and -O2
sets -ffreetmps-each-loop
.
Forces apparently unused subroutines from package Packname to be
compiled, permitting programs to use eval
"foo()"
even if subroutine
foo
isn't seen to be used at compile time. You can specify multiple
-u options.
Compiles verbosely.