[Codegen] Add PCF Transforms
This adds the transformation passes for the PCF dialect:
- ConvertForallToLoopsPass: Entry point that converts scf.forall ops with workgroup mapping to pcf.loop
- FuseConsumersPass: Fuses consumer operations into pcf.loop bodies
- FusePCFWritesPass: Consolidates pcf.write_slice ops in loop bodies
- LowerStructuralPCFPass: Lowers pcf.generic/loop to scf.execute_region/forall
- ConvertSRefToMemRefPass: Converts pcf.sref types to concrete memref types
- ResolveTokensPass: Resolves sync scope tokens on pcf.sref types
Also includes:
- Transforms.h/cpp: Shared transformation utilities for PCF
- ConversionDialectInterface.h: Interface for dialect-specific lowering
This is ready for review, but is kind of large. If reviewers prefer I can split this further by pass (I was just being lazy about figuring out how to split the build deps and rebasing is a lot easier with one PR).
This is ready for review, but is kind of large. If reviewers prefer I can split this further by pass (I was just being lazy about figuring out how to split the build deps and rebasing is a lot easier with one PR).
Yeah can you split it up into a few smaller PRs? It's much easier to care out time to review <1k or ideally <500 LOC...
This is ready for review, but is kind of large. If reviewers prefer I can split this further by pass (I was just being lazy about figuring out how to split the build deps and rebasing is a lot easier with one PR).
Yeah can you split it up into a few smaller PRs? It's much easier to care out time to review <1k or ideally <500 LOC...
Sure! I can do it pass by pass then, no need to review right now in that case.
Split up at #22911, #22912, #22914, #22915, #22916, #22917, and #22918. #22910 is the base which adds the directory boilerplate which I'll land concurrently with whichever of the others is approved first.
I'm going to leave this open for my own testing during reviews of the other files but will convert to a draft.