Question about -passes parameter in opt

Hi!

When I read the source code of opt, I noticed there is a comment:

  // Add passes specified using the legacy PM syntax (i.e. not using
  // -passes). This should be removed later when such support has been
  // deprecated, i.e. when all lit tests running opt (and not using
  // -enable-new-pm=0) have been updated to use -passes.

However, I can’t find any official site related to the new -pass syntax. All I found is a function comment:
https://llvm.org/doxygen/classllvm_1_1PassBuilder.html#a9ca0e57e6445ab2fe568e53ba29cc0fd
and opt doesn’t have explanation about the parameter neither.

Is there any explanation about the syntax in a more detailed way?
Thanks!

All the best,
Spica

This looks reasonably detailed: Using the New Pass Manager — LLVM 15.0.0git documentation

1 Like

How silly I am!