mirror of https://github.com/llvm/torch-mlir
Add some cleanup passes.
This makes the IR more presentable before going to the next phase of lowering (ops on memref/buffers -> LLVM ops).pull/1/head
parent
83db558db9
commit
174ab19c5f
|
@ -49,6 +49,7 @@
|
||||||
#include "mlir/Pass/Pass.h"
|
#include "mlir/Pass/Pass.h"
|
||||||
#include "mlir/Pass/PassRegistry.h"
|
#include "mlir/Pass/PassRegistry.h"
|
||||||
#include "mlir/Transforms/DialectConversion.h"
|
#include "mlir/Transforms/DialectConversion.h"
|
||||||
|
#include "mlir/Transforms/Passes.h"
|
||||||
#include "npcomp/Conversion/TCFToTCP/TCFToTCP.h"
|
#include "npcomp/Conversion/TCFToTCP/TCFToTCP.h"
|
||||||
#include "npcomp/Conversion/TCPToLinalg/TCPToLinalg.h"
|
#include "npcomp/Conversion/TCPToLinalg/TCPToLinalg.h"
|
||||||
#include "npcomp/Dialect/TCP/IR/TCPDialect.h"
|
#include "npcomp/Dialect/TCP/IR/TCPDialect.h"
|
||||||
|
@ -249,6 +250,11 @@ void mlir::NPCOMP::createE2ELoweringPipeline(OpPassManager &pm) {
|
||||||
// planning on just inlining the islands, so there is little value in
|
// planning on just inlining the islands, so there is little value in
|
||||||
// doing this, but we should look at the layering aspects here later.
|
// doing this, but we should look at the layering aspects here later.
|
||||||
|
|
||||||
|
// At this point, we have loose shape calculations floating around, so
|
||||||
|
// it's a good time to do some general cleanups.
|
||||||
|
pm.addPass(createCanonicalizerPass());
|
||||||
|
pm.addPass(createCSEPass());
|
||||||
|
|
||||||
// TODO:
|
// TODO:
|
||||||
// lower linalg to loops: mlir::createConvertLinalgToLoopsPass()
|
// lower linalg to loops: mlir::createConvertLinalgToLoopsPass()
|
||||||
// lower shape stuff to ssa values.
|
// lower shape stuff to ssa values.
|
||||||
|
|
Loading…
Reference in New Issue