Is there a reason why not to use link-time optimization (LTO)?

后端 未结 5 1216
暖寄归人
暖寄归人 2020-12-05 06:31

GCC, MSVC, LLVM, and probably other toolchains have support for link-time (whole program) optimization to allow optimization of calls among compilation units.

Is the

5条回答
  •  不思量自难忘°
    2020-12-05 06:48

    If you have well written code, it should only be advantageous. You may hit a compiler/linker bug, but this goes for all types of optimisation, this is rare.

    Biggest downside is it drastically increases link time.

提交回复
热议问题