Run required passes in pass_info of a pass

Hi all,

Recently I am playing things in pass. Yet I found those required passes in pass_info can be triggered only when leveraging Sequential operator().

If we run a ModulePass, FunctionPass or PrimFuncPass directly. It seems to me that required passes are not dealt at all. (After checking again, pass_ctx.PassEnabled also works at Sequential only).

Did I miss something or is it intentionally designed in this way?

I put a prototype in github. Hope it could give you some reference. :smiley:

Thank you for reading!