#include "mlir/Dialect/XeGPU/Transforms/Passes.h"
#include "mlir/Dialect/Affine/ViewLikeInterfaceUtils.h"
#include "mlir/Dialect/MemRef/IR/MemRef.h"
#include "mlir/Dialect/XeGPU/IR/XeGPU.h"
#include "mlir/Dialect/XeGPU/Transforms/Transforms.h"
#include "mlir/Pass/Pass.h"
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"
#include "llvm/Support/Debug.h"
namespace mlir {
namespace xegpu {
#define GEN_PASS_DEF_XEGPUFOLDALIASOPS
#include "mlir/Dialect/XeGPU/Transforms/Passes.h.inc"
}
}
#define DEBUG_TYPE …
#define DBGS() …
usingnamespacemlir;
namespace {
class XegpuCreateNdDescOpSubViewOpFolder final
: public OpRewritePattern<xegpu::CreateNdDescOp> { … };
}
LogicalResult XegpuCreateNdDescOpSubViewOpFolder::matchAndRewrite(
xegpu::CreateNdDescOp descOp, PatternRewriter &rewriter) const { … }
void xegpu::populateXeGPUFoldAliasOpsPatterns(RewritePatternSet &patterns) { … }
namespace {
struct XeGPUFoldAliasOpsPass final
: public xegpu::impl::XeGPUFoldAliasOpsBase<XeGPUFoldAliasOpsPass> { … };
}
void XeGPUFoldAliasOpsPass::runOnOperation() { … }