forked from OSchip/llvm-project
[WIP][mlir] Resolve memref dependency in canonicalize pass.
Splitting the memref dialect lead to an introduction of several dependencies to avoid compilation issues. The canonicalize pass also depends on the memref dialect, but it shouldn't. This patch resolves the dependencies and the unintuitive includes are removed. However, the dependency moves to the constructor of the std dialect. Differential Revision: https://reviews.llvm.org/D102060
This commit is contained in:
parent
7c16f93c44
commit
1fbb484ea4
|
@ -14,6 +14,7 @@
|
||||||
#ifndef MLIR_DIALECT_STANDARDOPS_IR_OPS_H
|
#ifndef MLIR_DIALECT_STANDARDOPS_IR_OPS_H
|
||||||
#define MLIR_DIALECT_STANDARDOPS_IR_OPS_H
|
#define MLIR_DIALECT_STANDARDOPS_IR_OPS_H
|
||||||
|
|
||||||
|
#include "mlir/Dialect/MemRef/IR/MemRef.h"
|
||||||
#include "mlir/IR/Builders.h"
|
#include "mlir/IR/Builders.h"
|
||||||
#include "mlir/IR/BuiltinTypes.h"
|
#include "mlir/IR/BuiltinTypes.h"
|
||||||
#include "mlir/IR/Dialect.h"
|
#include "mlir/IR/Dialect.h"
|
||||||
|
|
|
@ -27,6 +27,9 @@ def StandardOps_Dialect : Dialect {
|
||||||
let name = "std";
|
let name = "std";
|
||||||
let cppNamespace = "";
|
let cppNamespace = "";
|
||||||
let hasConstantMaterializer = 1;
|
let hasConstantMaterializer = 1;
|
||||||
|
// TODO: This dependency is needed to handle memref ops in the
|
||||||
|
// canonicalize pass and should be resolved.
|
||||||
|
let dependentDialects = ["memref::MemRefDialect"];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Base class for Standard dialect ops.
|
// Base class for Standard dialect ops.
|
||||||
|
|
|
@ -362,7 +362,6 @@ def Canonicalizer : Pass<"canonicalize"> {
|
||||||
details.
|
details.
|
||||||
}];
|
}];
|
||||||
let constructor = "mlir::createCanonicalizerPass()";
|
let constructor = "mlir::createCanonicalizerPass()";
|
||||||
let dependentDialects = ["memref::MemRefDialect"];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
def CSE : Pass<"cse"> {
|
def CSE : Pass<"cse"> {
|
||||||
|
|
|
@ -18,7 +18,6 @@
|
||||||
#include "mlir/Dialect/GPU/Passes.h"
|
#include "mlir/Dialect/GPU/Passes.h"
|
||||||
#include "mlir/Dialect/LLVMIR/NVVMDialect.h"
|
#include "mlir/Dialect/LLVMIR/NVVMDialect.h"
|
||||||
#include "mlir/Dialect/Math/IR/Math.h"
|
#include "mlir/Dialect/Math/IR/Math.h"
|
||||||
#include "mlir/Dialect/MemRef/IR/MemRef.h"
|
|
||||||
#include "mlir/IR/BlockAndValueMapping.h"
|
#include "mlir/IR/BlockAndValueMapping.h"
|
||||||
#include "mlir/Transforms/DialectConversion.h"
|
#include "mlir/Transforms/DialectConversion.h"
|
||||||
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"
|
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
#include "mlir/Analysis/Utils.h"
|
#include "mlir/Analysis/Utils.h"
|
||||||
#include "mlir/Dialect/Affine/IR/AffineOps.h"
|
#include "mlir/Dialect/Affine/IR/AffineOps.h"
|
||||||
#include "mlir/Dialect/Affine/Passes.h"
|
#include "mlir/Dialect/Affine/Passes.h"
|
||||||
#include "mlir/Dialect/MemRef/IR/MemRef.h"
|
|
||||||
#include "mlir/Dialect/StandardOps/IR/Ops.h"
|
#include "mlir/Dialect/StandardOps/IR/Ops.h"
|
||||||
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"
|
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"
|
||||||
#include "mlir/Transforms/LoopUtils.h"
|
#include "mlir/Transforms/LoopUtils.h"
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
|
|
||||||
#include "mlir/Transforms/Bufferize.h"
|
#include "mlir/Transforms/Bufferize.h"
|
||||||
#include "PassDetail.h"
|
#include "PassDetail.h"
|
||||||
#include "mlir/Dialect/MemRef/IR/MemRef.h"
|
|
||||||
#include "mlir/Dialect/SCF/Passes.h"
|
#include "mlir/Dialect/SCF/Passes.h"
|
||||||
#include "mlir/Dialect/SCF/SCF.h"
|
#include "mlir/Dialect/SCF/SCF.h"
|
||||||
#include "mlir/Dialect/SCF/Transforms.h"
|
#include "mlir/Dialect/SCF/Transforms.h"
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
|
|
||||||
#include "mlir/Transforms/Bufferize.h"
|
#include "mlir/Transforms/Bufferize.h"
|
||||||
#include "PassDetail.h"
|
#include "PassDetail.h"
|
||||||
#include "mlir/Dialect/MemRef/IR/MemRef.h"
|
|
||||||
#include "mlir/Dialect/Shape/Transforms/Passes.h"
|
#include "mlir/Dialect/Shape/Transforms/Passes.h"
|
||||||
#include "mlir/Pass/Pass.h"
|
#include "mlir/Pass/Pass.h"
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,6 @@
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
#include "PassDetail.h"
|
#include "PassDetail.h"
|
||||||
#include "mlir/Dialect/MemRef/IR/MemRef.h"
|
|
||||||
#include "mlir/Pass/Pass.h"
|
#include "mlir/Pass/Pass.h"
|
||||||
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"
|
#include "mlir/Transforms/GreedyPatternRewriteDriver.h"
|
||||||
#include "mlir/Transforms/Passes.h"
|
#include "mlir/Transforms/Passes.h"
|
||||||
|
|
Loading…
Reference in New Issue