35 pm.
addNestedPass<func::FuncOp>(createLinalgGeneralizeNamedOpsPass());
36 pm.
addNestedPass<func::FuncOp>(createLinalgElementwiseOpFusionPass());
41 options.testBufferizationAnalysisOnly),
46 options.force32BitVectorIndices,
48 options.sparsificationOptions().sparseEmitStrategy,
49 options.sparsificationOptions().parallelizationStrategy));
52 if (
options.testBufferizationAnalysisOnly)
62 const bool gpuCodegen =
options.gpuTriple.hasValue();
67 pm.
addNestedPass<gpu::GPUModuleOp>(createConvertGpuOpsToNVVMOps());
74 pm.
addNestedPass<func::FuncOp>(createConvertLinalgToLoopsPass());
81 createConvertVectorToLLVMPass(
options.convertVectorToLLVMOptions()));
82 pm.
addPass(createFinalizeMemRefToLLVMConversionPass());
84 pm.
addNestedPass<func::FuncOp>(arith::createArithExpandOpsPass());
85 pm.
addNestedPass<func::FuncOp>(createConvertMathToLLVMPass());
89 createConvertVectorToLLVMPass(
options.convertVectorToLLVMOptions()));
90 pm.
addPass(createConvertComplexToLLVMPass());
92 createConvertVectorToLLVMPass(
options.convertVectorToLLVMOptions()));
93 pm.
addPass(createConvertFuncToLLVMPass());
97 GpuNVVMAttachTargetOptions nvvmTargetOptions;
98 nvvmTargetOptions.triple =
options.gpuTriple;
99 nvvmTargetOptions.chip =
options.gpuChip;
100 nvvmTargetOptions.features =
options.gpuFeatures;
101 pm.
addPass(createGpuNVVMAttachTarget(nvvmTargetOptions));
102 pm.
addPass(createGpuToLLVMConversionPass());
103 GpuModuleToBinaryPassOptions gpuModuleToBinaryPassOptions;
104 gpuModuleToBinaryPassOptions.compilationTarget =
options.gpuFormat;
105 pm.
addPass(createGpuModuleToBinaryPass(gpuModuleToBinaryPassOptions));
119 "The standard pipeline for taking sparsity-agnostic IR using the"
120 " sparse-tensor type, and lowering it to LLVM IR with concrete"
121 " representations and algorithms for sparse tensors.",
static llvm::ManagedStatic< PassManagerOptions > options
This class represents a pass manager that runs passes on either a specific operation type,...
void addPass(std::unique_ptr< Pass > pass)
Add the given pass to this pass manager.
void addNestedPass(std::unique_ptr< Pass > pass)
Add the given pass to a nested pass manager for the given operation kind OpT.
std::unique_ptr< OperationPass< func::FuncOp > > createFinalizingBufferizePass()
Creates a pass that finalizes a partial bufferization by removing remaining bufferization....
std::unique_ptr< Pass > createExpandStridedMetadataPass()
Creates an operation pass to expand some memref operation into easier to reason about operations.
std::unique_ptr< Pass > createExpandReallocPass(bool emitDeallocs=true)
Creates an operation pass to expand memref.realloc operations into their components.
void buildSparsifier(OpPassManager &pm, const SparsifierOptions &options)
Adds the "sparsifier" pipeline to the OpPassManager.
void registerSparseTensorPipelines()
Registers all pipelines for the sparse_tensor dialect.
std::unique_ptr< OperationPass< ModuleOp > > createConvertComplexToLibmPass()
Create a pass to convert Complex operations to libm calls.
std::unique_ptr< Pass > createSparseGPUCodegenPass()
bufferization::OneShotBufferizationOptions getBufferizationOptionsForSparsification(bool analysisOnly)
std::unique_ptr< Pass > createStripDebugInfoPass()
Creates a pass to strip debug information from a function.
std::unique_ptr< Pass > createSparsificationAndBufferizationPass()
std::unique_ptr< Pass > createConvertSCFToCFPass()
Creates a pass to convert SCF operations to CFG branch-based operation in the ControlFlow dialect.
std::unique_ptr< OperationPass< ModuleOp > > createConvertMathToLibmPass()
Create a pass to convert Math operations to libm calls.
std::unique_ptr< Pass > createStorageSpecifierToLLVMPass()
std::unique_ptr< Pass > createCanonicalizerPass()
Creates an instance of the Canonicalizer pass, configured with default settings (which can be overrid...
std::unique_ptr< Pass > createReconcileUnrealizedCastsPass()
Creates a pass that eliminates noop unrealized_conversion_cast operation sequences.
std::unique_ptr< Pass > createConvertVectorToSCFPass(const VectorTransferToSCFOptions &options=VectorTransferToSCFOptions())
Create a pass to convert a subset of vector ops to SCF.
std::unique_ptr< Pass > createConvertComplexToStandardPass()
Create a pass to convert Complex operations to the Standard dialect.
std::unique_ptr< Pass > createLowerAffinePass()
Lowers affine control flow operations (ForStmt, IfStmt and AffineApplyOp) to equivalent lower-level c...
PassPipelineRegistration provides a global initializer that registers a Pass pipeline builder routine...
Options for the "sparsifier" pipeline.