[PATCH] D148010: [Pipelines] Don't run module optimization in full LTO pre-link

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 19 14:46:28 PDT 2023


nikic added a comment.

In D148010#4357721 <https://reviews.llvm.org/D148010#4357721>, @mehdi_amini wrote:

> As far as I remember, there were a bunch of passes that are part of the compile-time phase that are not in the FullLTO link-time pipeline: if you just pruning all these from the compile-time phase, aren't we gonna miss on some optimization opportunities?
> That is: passes that "shouldn't be run" during the compile-time are actually executed here because we don't have time-budget to run all this during the link-time (which in turns focuses on catching up on cross-module opt + lightweight pipeline).

To the most part, passes that are part of the module optimization phase do also get run post-link in full LTO (the big differences are before that -- the simplification phase is much reduced in full LTO and also does not use CGSCC interleaving). There is a small number of differences (e.g. missing loop load elimination) that I still plan to address. The probably more substantial problem is that while the right passes get run, they get run in the wrong order. In particular, runtime unrolling is performed before vectorization, rather than after. I plan to address these issues before moving forward with this patch, but not sure when I'll get around to it.


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

https://reviews.llvm.org/D148010



More information about the llvm-commits mailing list