Question about -passes parameter in opt


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:
and opt doesn’t have explanation about the parameter neither.

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

All the best,

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

1 Like

How silly I am!