#include "mlir/Dialect/Affine/Passes.h"
#include "mlir/Analysis/AliasAnalysis.h"
#include "mlir/Dialect/Affine/Utils.h"
#include "mlir/Dialect/Func/IR/FuncOps.h"
#include "mlir/IR/Dominance.h"
#include <algorithm>
namespace mlir {
namespace affine {
#define GEN_PASS_DEF_AFFINESCALARREPLACEMENT
#include "mlir/Dialect/Affine/Passes.h.inc"
}
}
#define DEBUG_TYPE …
usingnamespacemlir;
usingnamespacemlir::affine;
namespace {
struct AffineScalarReplacement
: public affine::impl::AffineScalarReplacementBase<
AffineScalarReplacement> { … };
}
std::unique_ptr<OperationPass<func::FuncOp>>
mlir::affine::createAffineScalarReplacementPass() { … }
void AffineScalarReplacement::runOnOperation() { … }