Looking for guidance/examples/docs related to "Super Passes"

Hi all,

I’m working on a downstream target and have been coming across times where I would like to run a pass during another pass.

Specifically, the MachinePipeliner is a pass that can be somewhat reliant on prior optimizations, and may greatly affect future optimizations. Case-in-point, register allocation:

2019 EuroLLVM Developers’ Meeting: L. Saba “Swinging Modulo Scheduling together with Register …” - YouTube

This presentation brings two things to light that I am not well-versed in:

  • Passes that run other passes
  • Communication between passes

At this point I’d be interested in information on both the Legacy and New pass managers, but my implementation and expertise is only at the “Machine” IR level at the moment, so I will be using the Legacy pass manager in examples.