Skip to content

Commit

Permalink
Minimize optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerry Wu committed Aug 29, 2023
1 parent 39958f8 commit f49d76e
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions compiler/src/iree/compiler/Codegen/LLVMCPU/Passes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -507,20 +507,16 @@ void addMultiTilingExpertPassPipeline(
nestedModulePM.addNestedPass<func::FuncOp>(createCSEPass());
}

// Eliminate redundant transfer_read/write to avoid stack allocations.
nestedModulePM.addNestedPass<func::FuncOp>(
createOptimizeVectorTransferPass(/*flatten=*/false));

addBufferizePasses(nestedModulePM);

// Perform memref-based transfer_read/write optimizations.
nestedModulePM.addNestedPass<func::FuncOp>(
createOptimizeVectorTransferPass(/*flatten=*/false));

// Run IREE specific passes before vector lowering expert.
nestedModulePM.addNestedPass<func::FuncOp>(
createRemoveSingleIterationLoopPass());

// Perform memref-based transfer_read/write optimizations.
nestedModulePM.addNestedPass<func::FuncOp>(
createOptimizeVectorTransferPass(/*flatten=*/false));

{
LLVMCPUVectorLoweringPassOptions options;
options.lowerVectorTransposeToAVX2 = lowerToAVX2;
Expand Down

0 comments on commit f49d76e

Please sign in to comment.