MLIR 24.0.0git
mlir::bufferization::OneShotBufferizationOptions Struct Reference

Options for analysis-enabled bufferization. More...

#include "mlir/Dialect/Bufferization/Transforms/OneShotAnalysis.h"

Inheritance diagram for mlir::bufferization::OneShotBufferizationOptions:

Public Types

enum class  AnalysisHeuristic { BottomUp , TopDown , BottomUpFromTerminators , Fuzzer }

Public Member Functions

 OneShotBufferizationOptions ()=default

Public Attributes

bool allowReturnAllocsFromLoops = false
 Specifies whether returning newly allocated memrefs from loops should be allowed.
bool dumpAliasSets = false
 Specifies whether the tensor IR should be annotated with alias sets.
AnalysisHeuristic analysisHeuristic = AnalysisHeuristic::BottomUp
 The heuristic controls the order in which ops are traversed during the analysis.
llvm::ArrayRef< std::string > noAnalysisFuncFilter
 Specify the functions that should not be analyzed.
unsigned analysisFuzzerSeed = 0
 Seed for the analysis fuzzer.
std::optional< bool > mayHaveUnstructuredControlFlow = std::nullopt
 Whether the IR contains a region with more than one block.

Detailed Description

Options for analysis-enabled bufferization.

Definition at line 29 of file OneShotAnalysis.h.

Member Enumeration Documentation

◆ AnalysisHeuristic

Enumerator
BottomUp 
TopDown 
BottomUpFromTerminators 
Fuzzer 

Definition at line 30 of file OneShotAnalysis.h.

Constructor & Destructor Documentation

◆ OneShotBufferizationOptions()

mlir::bufferization::OneShotBufferizationOptions::OneShotBufferizationOptions ( )
default

Member Data Documentation

◆ allowReturnAllocsFromLoops

bool mlir::bufferization::OneShotBufferizationOptions::allowReturnAllocsFromLoops = false

Specifies whether returning newly allocated memrefs from loops should be allowed.

Otherwise, a pass failure is triggered.

Definition at line 41 of file OneShotAnalysis.h.

◆ analysisFuzzerSeed

unsigned mlir::bufferization::OneShotBufferizationOptions::analysisFuzzerSeed = 0

Seed for the analysis fuzzer.

Used only if the heuristic is set to AnalysisHeuristic::Fuzzer. The fuzzer should be used only with testAnalysisOnly = true.

Definition at line 57 of file OneShotAnalysis.h.

◆ analysisHeuristic

AnalysisHeuristic mlir::bufferization::OneShotBufferizationOptions::analysisHeuristic = AnalysisHeuristic::BottomUp

The heuristic controls the order in which ops are traversed during the analysis.

Definition at line 48 of file OneShotAnalysis.h.

Referenced by mlir::bufferization::OneShotAnalysisState::analyzeOp().

◆ dumpAliasSets

bool mlir::bufferization::OneShotBufferizationOptions::dumpAliasSets = false

Specifies whether the tensor IR should be annotated with alias sets.

Definition at line 44 of file OneShotAnalysis.h.

◆ mayHaveUnstructuredControlFlow

std::optional<bool> mlir::bufferization::OneShotBufferizationOptions::mayHaveUnstructuredControlFlow = std::nullopt

Whether the IR contains a region with more than one block.

When unset, the analysis walks the IR to compute it. Note: If the IR contains unstructured control flow, but this flag is set to "false", the bufferization may produce incorrect IR.

Definition at line 63 of file OneShotAnalysis.h.

◆ noAnalysisFuncFilter

llvm::ArrayRef<std::string> mlir::bufferization::OneShotBufferizationOptions::noAnalysisFuncFilter

Specify the functions that should not be analyzed.

copyBeforeWrite will be set to true when bufferizing them.

Definition at line 52 of file OneShotAnalysis.h.


The documentation for this struct was generated from the following file: