24 #define GEN_PASS_DEF_AFFINESCALARREPLACEMENT
25 #include "mlir/Dialect/Affine/Passes.h.inc"
29 #define DEBUG_TYPE "affine-scalrep"
35 struct AffineScalarReplacement
36 :
public affine::impl::AffineScalarReplacementBase<
37 AffineScalarReplacement> {
38 void runOnOperation()
override;
43 std::unique_ptr<OperationPass<func::FuncOp>>
45 return std::make_unique<AffineScalarReplacement>();
48 void AffineScalarReplacement::runOnOperation() {
50 getAnalysis<PostDominanceInfo>(),
51 getAnalysis<AliasAnalysis>());
std::unique_ptr< OperationPass< func::FuncOp > > createAffineScalarReplacementPass()
Creates a pass to replace affine memref accesses by scalars using store to load forwarding and redund...
void affineScalarReplace(func::FuncOp f, DominanceInfo &domInfo, PostDominanceInfo &postDomInfo, AliasAnalysis &analysis)
Replace affine store and load accesses by scalars by forwarding stores to loads and eliminate invaria...
Include the generated interface declarations.