diff options
Diffstat (limited to 'mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRV.cpp')
-rw-r--r-- | mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRV.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRV.cpp b/mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRV.cpp index 95c46853b1f..509457d076a 100644 --- a/mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRV.cpp +++ b/mlir/lib/Conversion/GPUToSPIRV/ConvertGPUToSPIRV.cpp @@ -27,7 +27,7 @@ public: using SPIRVOpLowering<loop::ForOp>::SPIRVOpLowering; PatternMatchResult - matchAndRewrite(loop::ForOp forOp, ArrayRef<ValuePtr> operands, + matchAndRewrite(loop::ForOp forOp, ArrayRef<Value> operands, ConversionPatternRewriter &rewriter) const override; }; @@ -39,7 +39,7 @@ public: using SPIRVOpLowering<SourceOp>::SPIRVOpLowering; PatternMatchResult - matchAndRewrite(SourceOp op, ArrayRef<ValuePtr> operands, + matchAndRewrite(SourceOp op, ArrayRef<Value> operands, ConversionPatternRewriter &rewriter) const override; }; @@ -56,7 +56,7 @@ public: } PatternMatchResult - matchAndRewrite(gpu::GPUFuncOp funcOp, ArrayRef<ValuePtr> operands, + matchAndRewrite(gpu::GPUFuncOp funcOp, ArrayRef<Value> operands, ConversionPatternRewriter &rewriter) const override; private: @@ -70,7 +70,7 @@ public: using SPIRVOpLowering<ModuleOp>::SPIRVOpLowering; PatternMatchResult - matchAndRewrite(ModuleOp moduleOp, ArrayRef<ValuePtr> operands, + matchAndRewrite(ModuleOp moduleOp, ArrayRef<Value> operands, ConversionPatternRewriter &rewriter) const override; }; @@ -83,7 +83,7 @@ public: using SPIRVOpLowering<ModuleTerminatorOp>::SPIRVOpLowering; PatternMatchResult - matchAndRewrite(ModuleTerminatorOp terminatorOp, ArrayRef<ValuePtr> operands, + matchAndRewrite(ModuleTerminatorOp terminatorOp, ArrayRef<Value> operands, ConversionPatternRewriter &rewriter) const override; }; @@ -94,7 +94,7 @@ public: using SPIRVOpLowering<gpu::ReturnOp>::SPIRVOpLowering; PatternMatchResult - matchAndRewrite(gpu::ReturnOp returnOp, ArrayRef<ValuePtr> operands, + matchAndRewrite(gpu::ReturnOp returnOp, ArrayRef<Value> operands, ConversionPatternRewriter &rewriter) const override; }; @@ -105,7 +105,7 @@ public: //===----------------------------------------------------------------------===// PatternMatchResult -ForOpConversion::matchAndRewrite(loop::ForOp forOp, ArrayRef<ValuePtr> operands, +ForOpConversion::matchAndRewrite(loop::ForOp forOp, ArrayRef<Value> operands, ConversionPatternRewriter &rewriter) const { // loop::ForOp can be lowered to the structured control flow represented by // spirv::LoopOp by making the continue block of the spirv::LoopOp the loop @@ -126,7 +126,7 @@ ForOpConversion::matchAndRewrite(loop::ForOp forOp, ArrayRef<ValuePtr> operands, loopOp.body().getBlocks().insert(std::next(loopOp.body().begin(), 1), header); // Create the new induction variable to use. - BlockArgumentPtr newIndVar = + BlockArgument newIndVar = header->addArgument(forOperands.lowerBound()->getType()); Block *body = forOp.getBody(); @@ -157,7 +157,7 @@ ForOpConversion::matchAndRewrite(loop::ForOp forOp, ArrayRef<ValuePtr> operands, auto cmpOp = rewriter.create<spirv::SLessThanOp>( loc, rewriter.getI1Type(), newIndVar, forOperands.upperBound()); rewriter.create<spirv::BranchConditionalOp>( - loc, cmpOp, body, ArrayRef<ValuePtr>(), mergeBlock, ArrayRef<ValuePtr>()); + loc, cmpOp, body, ArrayRef<Value>(), mergeBlock, ArrayRef<Value>()); // Generate instructions to increment the step of the induction variable and // branch to the header. @@ -165,7 +165,7 @@ ForOpConversion::matchAndRewrite(loop::ForOp forOp, ArrayRef<ValuePtr> operands, rewriter.setInsertionPointToEnd(continueBlock); // Add the step to the induction variable and branch to the header. - ValuePtr updatedIndVar = rewriter.create<spirv::IAddOp>( + Value updatedIndVar = rewriter.create<spirv::IAddOp>( loc, newIndVar->getType(), newIndVar, forOperands.step()); rewriter.create<spirv::BranchOp>(loc, header, updatedIndVar); @@ -179,7 +179,7 @@ ForOpConversion::matchAndRewrite(loop::ForOp forOp, ArrayRef<ValuePtr> operands, template <typename SourceOp, spirv::BuiltIn builtin> PatternMatchResult LaunchConfigConversion<SourceOp, builtin>::matchAndRewrite( - SourceOp op, ArrayRef<ValuePtr> operands, + SourceOp op, ArrayRef<Value> operands, ConversionPatternRewriter &rewriter) const { auto dimAttr = op.getOperation()->template getAttrOfType<StringAttr>("dimension"); @@ -258,7 +258,7 @@ lowerAsEntryFunction(gpu::GPUFuncOp funcOp, SPIRVTypeConverter &typeConverter, PatternMatchResult KernelFnConversion::matchAndRewrite(gpu::GPUFuncOp funcOp, - ArrayRef<ValuePtr> operands, + ArrayRef<Value> operands, ConversionPatternRewriter &rewriter) const { if (!gpu::GPUDialect::isKernel(funcOp)) { return matchFailure(); @@ -288,7 +288,7 @@ KernelFnConversion::matchAndRewrite(gpu::GPUFuncOp funcOp, //===----------------------------------------------------------------------===// PatternMatchResult KernelModuleConversion::matchAndRewrite( - ModuleOp moduleOp, ArrayRef<ValuePtr> operands, + ModuleOp moduleOp, ArrayRef<Value> operands, ConversionPatternRewriter &rewriter) const { if (!moduleOp.getAttrOfType<UnitAttr>( gpu::GPUDialect::getKernelModuleAttrName())) { @@ -318,7 +318,7 @@ PatternMatchResult KernelModuleConversion::matchAndRewrite( //===----------------------------------------------------------------------===// PatternMatchResult KernelModuleTerminatorConversion::matchAndRewrite( - ModuleTerminatorOp terminatorOp, ArrayRef<ValuePtr> operands, + ModuleTerminatorOp terminatorOp, ArrayRef<Value> operands, ConversionPatternRewriter &rewriter) const { rewriter.replaceOpWithNewOp<spirv::ModuleEndOp>(terminatorOp); return matchSuccess(); @@ -329,7 +329,7 @@ PatternMatchResult KernelModuleTerminatorConversion::matchAndRewrite( //===----------------------------------------------------------------------===// PatternMatchResult GPUReturnOpConversion::matchAndRewrite( - gpu::ReturnOp returnOp, ArrayRef<ValuePtr> operands, + gpu::ReturnOp returnOp, ArrayRef<Value> operands, ConversionPatternRewriter &rewriter) const { if (!operands.empty()) return matchFailure(); |