Execute regions permit operations which contain only one block to contain multiple blocks. Any instruction prior to a conditional branch is always executed and thus can be moved outside the region
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
mlir/lib/Dialect/SCF/SCF.cpp | ||
---|---|---|
256 | Movement is not supported as a root update, |
mlir/lib/Dialect/SCF/SCF.cpp | ||
---|---|---|
256 | What would the appropriate mechanism be? |
mlir/lib/Dialect/SCF/SCF.cpp | ||
---|---|---|
256 | "Root updates" support touching the operation itself, not any kind of nested operations/control flow/etc. I don't think we have any API that supports tracking individual operation movements, just at the block/region level. I suppose conceptually, we could naively split the block around the operation and then merge that block into the desired block location. That would avoid the need to touch the exposed rewriter API. We could also add API specifically for per-operation movement, but we'll need to add support to dialect conversion for tracking/undoing that. (Maybe an easy first step would be adding the desired API, but naively using the existing block related API underneath. We could optimize with a better implementation later). |
Movement is not supported as a root update,