This commit switches from the previous behavior of compiling the whole
program at once, to compiling every package in parallel and linking the
LLVM bitcode files together for further whole-program optimization.
This is a small performance win, but it has several advantages in the
future:
- There are many more things that can be done per package in parallel,
avoiding the bottleneck at the end of the compiler phase. This
should speed up the compiler futher.
- This change is a necessary step towards a non-LTO build mode for
fast incremental builds that only rebuild the changed package, when
compiler speed is more important than binary size.
- This change refactors the compiler in such a way that it will be
easier to inspect the IR for one package only. Inspecting this IR
will be very helpful for compiler developers.
|
||
|---|---|---|
| .. | ||
| testdata | ||
| cgo.go | ||
| cgo_test.go | ||
| const.go | ||
| const_test.go | ||
| libclang.go | ||
| libclang_config.go | ||
| libclang_config_llvm10.go | ||
| libclang_stubs.c | ||
| security.go | ||
| security_test.go | ||
| sync.go | ||