[Mlir-commits] [mlir] [MLIR][NFC] Stop depending on func.func in affine LoopUtils via &Region (PR #83325)
Alexey Z.
llvmlistbot at llvm.org
Thu May 30 12:03:34 PDT 2024
================
@@ -116,6 +116,8 @@ void AffineDataCopyGeneration::runOnBlock(Block *block,
AffineCopyOptions copyOptions = {generateDma, slowMemorySpace,
fastMemorySpace, tagMemorySpace,
fastMemCapacityBytes};
+ auto &topRegion =
+ block->getParent()->getParentOfType<func::FuncOp>().getBody();
----------------
last5bits wrote:
@joker-eph
> and we also should check for a FunctionOpInterface instead for generality.
Fixed.
> getParentOfType can fail which needs to be handled (fallback to getParentRegion?)
Do you mean find the highest-level overarching region and fall back to that?
https://github.com/llvm/llvm-project/pull/83325
More information about the Mlir-commits
mailing list