[PATCH] D142725: [DFAJumpThreading] Enable DFAJT with LTO

Gabor Marton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 27 08:25:28 PST 2023


martong added a comment.

In D142725#4085822 <https://reviews.llvm.org/D142725#4085822>, @alexey.zhikhar wrote:

> Thanks for the patch.
>
> Question: why LTO? I'm no longer with the company where I worked on this and my recollections are starting to get fuzzy but AFAIR this optimization doesn't need the whole program. If so, you'll want to place this opt into the regular pipeline, where compilation of different translation units is parallelized.

Good question. We experienced that some of our users turn on LTO as the first step and then they experiment (and measure) by adding new extra flags via the linker. I.e. they want whole program optimization from the beginning. For instance,  first iteration:

  CFLAGS=...
  LDFLAGS=-O3 -flto

Second iteration:

  CFLAGS=...
  LDFLAGS=-O3 -flto -Wl,--plugin-opt=-inline-threshold=10000

Third iteration:

  CFLAGS=...
  LDFLAGS=-O3 -flto -Wl,--plugin-opt=-inline-threshold=10000 -Wl,--plugin-opt=-enable-dfa-jump-thread


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142725/new/

https://reviews.llvm.org/D142725



More information about the llvm-commits mailing list