[LLVMdev] flag_unit_at_a_time and pass scheduling in llvm-gcc
Devang Patel
dpatel at apple.com
Wed Apr 16 10:13:37 PDT 2008
On Apr 15, 2008, at 11:49 PM, Duncan Sands wrote:
> As far as I can see flag_unit_at_a_time
> is used to control whether inter-procedural/whole-module passes are
> scheduled.
You can do inlining even when flag_unit_at_a_time is off. And one can
enable unit-at-a-time without enabling any optimizations. The unit-at-
a-time is not meant to select optimization passes, though it may
influence selection.
Originally, this flag instructs gcc to parse entire source file before
producing code. I am told that originally gcc worked on one statement
at a time (stmt->parse->optimize->codegen->next-stmt). Later on it was
enhanced to work on a function at a time. Next logical step was to
work on a source file at a time. IIRC, the flag was required because
some of the lang. FE produced parsed trees caused huge amount of
memory pressure during code generation making unit-at-a-time not
suitable for all languages.
-
Devang
More information about the llvm-dev
mailing list