Skip to content

Commit 6bdf2cb

Browse files
authored
[mlir][NFC] Remove redundant insertion point changes (#161837)
These insertion points were added in llvm/llvm-project#146551 and llvm/llvm-project#146908 to support the one-shot dialect conversion driver which performs changes to the IR immediately and would otherwise invalidate previous insertion points. Since then, the insertion point has been made resilient against op erasure (llvm/llvm-project#146955) making the changes now redundant.
1 parent bbae6a4 commit 6bdf2cb

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

mlir/lib/Conversion/SPIRVToLLVM/ConvertLaunchFuncToLLVMCalls.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,9 +267,8 @@ class GPULaunchLowering : public ConvertOpToLLVMPattern<gpu::LaunchFuncOp> {
267267
copyInfo.push_back(info);
268268
}
269269
// Create a call to the kernel and copy the data back.
270-
Operation *callOp = rewriter.replaceOpWithNewOp<LLVM::CallOp>(
271-
op, kernelFunc, ArrayRef<Value>());
272-
rewriter.setInsertionPointAfter(callOp);
270+
rewriter.replaceOpWithNewOp<LLVM::CallOp>(op, kernelFunc,
271+
ArrayRef<Value>());
273272
for (CopyInfo info : copyInfo)
274273
copy(loc, info.src, info.dst, info.size, rewriter);
275274
return success();

mlir/lib/Conversion/TosaToLinalg/TosaToLinalgNamed.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -802,7 +802,6 @@ class MaxPool2dConverter : public OpConversionPattern<tosa::MaxPool2dOp> {
802802
ValueRange{paddedInput, fakeWindowDims}, filledEmptyTensor, strideAttr,
803803
dilationAttr);
804804

805-
rewriter.setInsertionPointAfter(op);
806805
NanPropagationMode nanMode = op.getNanMode();
807806
rewriter.replaceOp(op, resultOp);
808807

0 commit comments

Comments
 (0)