Skip to content

Commit 01be0d1

Browse files
committed
[mlir][NFC] Remove redundant insertion point changes
These insertion points were added in #146551 and #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 (#146955) making the changes now redundant.
1 parent c2765b7 commit 01be0d1

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

mlir/lib/Conversion/SPIRVToLLVM/ConvertLaunchFuncToLLVMCalls.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,9 +267,7 @@ 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, ArrayRef<Value>());
273271
for (CopyInfo info : copyInfo)
274272
copy(loc, info.src, info.dst, info.size, rewriter);
275273
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)