Rate This Document
Findability
Accuracy
Completeness
Readability

LTO

BiSheng compiler supports link-time optimization (LTO). The traditional compilation mode can only limit the optimization to a single compilation unit (such as a .c file). LTO can be globally used across compilation units to implement optimization such as cross-file function inlining, function specialization, and constant propagation. LTO often improves program performance, but requires longer compilation time. To enable LTO, you need to add -flto to both compilation (such as CFLAGS in a Makefile) and link options (such as LDFLAGS in a Makefile).