Skip to content

Commit 7033408

Browse files
author
Simon Camphausen
authored
[mlir][bufferization] Expose buffer alignment as a pass option in one-shot-bufferize (#112505)
1 parent 15d8576 commit 7033408

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

Diff for: mlir/include/mlir/Dialect/Bufferization/Transforms/Passes.td

+2
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,8 @@ def OneShotBufferize : Pass<"one-shot-bufferize", "ModuleOp"> {
536536
Option<"unknownTypeConversion", "unknown-type-conversion", "std::string",
537537
/*default=*/"\"fully-dynamic-layout-map\"",
538538
"Controls layout maps for non-inferrable memref types.">,
539+
Option<"bufferAlignment", "buffer-alignment", "uint64_t", /*default=*/"64",
540+
"Sets the alignment of newly allocated buffers.">,
539541
];
540542
let constructor = "mlir::bufferization::createOneShotBufferizePass()";
541543

Diff for: mlir/lib/Dialect/Bufferization/Transforms/Bufferize.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ struct OneShotBufferizePass
224224
};
225225
}
226226
opt.printConflicts = printConflicts;
227+
opt.bufferAlignment = bufferAlignment;
227228
opt.testAnalysisOnly = testAnalysisOnly;
228229
opt.bufferizeFunctionBoundaries = bufferizeFunctionBoundaries;
229230
opt.checkParallelRegions = checkParallelRegions;

0 commit comments

Comments
 (0)