All the AST passes other than inlining share a common pattern of iteration over target functions and generation of updates which could be abstracted to reduce the distinct code to maintain. This includes the new Lambda-lifting pass.
Inlining is a little trickier, as it needs to iterate over the functions in a particular order.
Analysis passes are easier, as they don't modify functions but perhaps they can also be in the same framework.
🚀 Feature Request
All the AST passes other than inlining share a common pattern of iteration over target functions and generation of updates which could be abstracted to reduce the distinct code to maintain. This includes the new Lambda-lifting pass.
Inlining is a little trickier, as it needs to iterate over the functions in a particular order.
Analysis passes are easier, as they don't modify functions but perhaps they can also be in the same framework.