Skip to content

Commit

Permalink
Revert "[MLIR] one-shot-bufferize: Add bufferize-bodiless-function-re…
Browse files Browse the repository at this point in the history
…sults option"

This reverts commit 151f763, except for the test added by it
  • Loading branch information
jorickert committed Jan 31, 2025
1 parent 494134c commit f7efc67
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -359,14 +359,6 @@ struct BufferizationOptions {
/// If `bufferizeFunctionBoundaries` is not set, this flag has no effect.
bool inferFunctionResultLayout = true;

/// If true, bufferize results of bodiless functions using the
/// `functionArgTypeConverterFn`.
/// Otherwise, bufferization fails when encountering bodiless functions that
/// have tensor results.
///
/// If `bufferizeFunctionBoundaries` is not set, this flag has no effect.
bool bufferizeBodilessFunctionResults = false;

/// Type converter from tensors to memrefs. This type converter is used if no
/// memref type could be inferred during bufferization. By default, a type
/// converter that returns a memref type with a fully dynamic layout map is
Expand Down
3 changes: 0 additions & 3 deletions mlir/include/mlir/Dialect/Bufferization/Transforms/Passes.td
Original file line number Diff line number Diff line change
Expand Up @@ -507,9 +507,6 @@ def OneShotBufferize : Pass<"one-shot-bufferize", "ModuleOp"> {
Option<"bufferizeFunctionBoundaries", "bufferize-function-boundaries",
"bool", /*default=*/"0",
"Bufferize function boundaries (experimental).">,
Option<"bufferizeBodilessFunctionResults", "bufferize-bodiless-function-results",
"bool", /*default=*/"0",
"Bufferize results of bodiless functions.">,
Option<"checkParallelRegions", "check-parallel-regions", "bool",
/*default=*/"true", "Account for parallel regions in RaW analysis.">,
Option<"copyBeforeWrite", "copy-before-write", "bool", /*default=*/"false",
Expand Down
1 change: 0 additions & 1 deletion mlir/lib/Dialect/Bufferization/Transforms/Bufferize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@ struct OneShotBufferizePass
opt.bufferAlignment = bufferAlignment;
opt.testAnalysisOnly = testAnalysisOnly;
opt.bufferizeFunctionBoundaries = bufferizeFunctionBoundaries;
opt.bufferizeBodilessFunctionResults = bufferizeBodilessFunctionResults;
opt.checkParallelRegions = checkParallelRegions;
opt.noAnalysisFuncFilter = noAnalysisFuncFilter;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// RUN: mlir-opt %s -one-shot-bufferize="bufferize-function-boundaries=1 bufferize-bodiless-function-results=1" -split-input-file | FileCheck %s
// RUN: mlir-opt %s -one-shot-bufferize="bufferize-function-boundaries=1" -split-input-file | FileCheck %s

func.func private @foo() -> tensor<?xf32>
// CHECK: func.func private @foo() -> memref<?xf32, strided<[?], offset: ?>>
Expand Down

0 comments on commit f7efc67

Please sign in to comment.