Extending SwiftPack Compiler
Adding a pass
- Implement a
Transformationsubclass withcheck_legalityandapplymethods that accept the AST and any pass-specific keyword arguments. - Import the class in
scheduler.pyand include(YourTransformation, {"option": value})in the desired position in a scheduler's returned plan. The kwargs are passed to both methods. - The
applymethod should return the updated AST. The pipeline feeds that result into the next legality check and transformation.