[llvm-dev] Confused about optimization pass order

Doerfert, Johannes via llvm-dev llvm-dev at lists.llvm.org
Tue Jan 28 14:35:17 PST 2020


Hi Karl,

here is my, slightly oversimplified, take on this, I hope it helps.

We have a fixed, manually curated pipeline which seems to perform reasonably well (see for example llvm/lib/Transforms/IPO/PassManagerBuilder.cpp).
There are (call graph SCC) passes that run as part of this pipeline potentially multiple times, but still in the fixed order (as far as I know).

EJ (cc'ed) and I are going to propose a GSoC project to "learn" the interplay between sets of passes, e.g., what has to go together and in which order, and, potentially, alternative pipelines we could offer to people.
There are various details that are not totally clear yet but based on existing research it seems there are nice improvements to be expected if we find a way to manage the infrastructure challenges that come with such an effort.

Cheers,
  Johannes


________________________________________
From: llvm-dev <llvm-dev-bounces at lists.llvm.org> on behalf of Karl Rehm via llvm-dev <llvm-dev at lists.llvm.org>
Sent: Tuesday, January 28, 2020 16:19
To: llvm-dev at lists.llvm.org
Subject: [llvm-dev] Confused about optimization pass order

Hello,
I'm wondering how exactly LLVM deals with passes that open up opportunities for other passes. For example, InstCombine says that it opens many opportunities for dead code/store elimination. However, the reverse may also be true. How does LLVM currently handle this?


More information about the llvm-dev mailing list