From 614e4f869bc5bfb705215b21fb6cead982f4a8c7 Mon Sep 17 00:00:00 2001 From: Mathieu Fehr Date: Mon, 30 Dec 2024 16:56:31 +0000 Subject: [PATCH] core: Remove deprecated methods in Rewriter These methods were deprecated for a while stack-info: PR: https://github.com/xdslproject/xdsl/pull/3701, branch: math-fehr/stack/5 --- xdsl/rewriter.py | 61 ------------------------------------------------ 1 file changed, 61 deletions(-) diff --git a/xdsl/rewriter.py b/xdsl/rewriter.py index bf477401e0..b8726a782b 100644 --- a/xdsl/rewriter.py +++ b/xdsl/rewriter.py @@ -3,8 +3,6 @@ from collections.abc import Sequence from dataclasses import dataclass, field -from typing_extensions import deprecated - from xdsl.ir import Block, Operation, Region, SSAValue @@ -179,53 +177,6 @@ def inline_block( parent_region.detach_block(source) source.erase() - @deprecated("Please use `inline_block` instead") - @staticmethod - def inline_block_at_end( - inlined_block: Block, extended_block: Block, arg_values: Sequence[SSAValue] = () - ): - """ - Move the block operations to the end of another block. - This block should not be a parent of the block to move to. - The block operations should not use the block arguments. - """ - Rewriter.inline_block( - inlined_block, InsertPoint.at_end(extended_block), arg_values=arg_values - ) - - @deprecated("Please use `inline_block` instead") - @staticmethod - def inline_block_at_start( - inlined_block: Block, extended_block: Block, arg_values: Sequence[SSAValue] = () - ): - """ - Move the block operations to the start of another block. - This block should not be a parent of the block to move to. - The block operations should not use the block arguments. - """ - Rewriter.inline_block( - inlined_block, InsertPoint.at_start(extended_block), arg_values=arg_values - ) - - @deprecated("Please use `inline_block` instead") - @staticmethod - def inline_block_before( - source: Block, op: Operation, arg_values: Sequence[SSAValue] = () - ): - Rewriter.inline_block(source, InsertPoint.before(op), arg_values=arg_values) - - @deprecated("Please use `inline_block` instead") - @staticmethod - def inline_block_after( - block: Block, op: Operation, arg_values: Sequence[SSAValue] = () - ): - """ - Move the block operations after another operation. - The block should not be a parent of the operation. - The block operations should not use the block arguments. - """ - Rewriter.inline_block(block, InsertPoint.after(op), arg_values=arg_values) - @staticmethod def insert_block_after(block: Block | list[Block], target: Block): """ @@ -267,18 +218,6 @@ def insert_op( else: insertion_point.block.add_ops(ops) - @deprecated("Please use `insert_op` instead") - @staticmethod - def insert_op_after(op: Operation, new_op: Operation): - """Inserts a new operation after another operation.""" - Rewriter.insert_op(new_op, InsertPoint.after(op)) - - @deprecated("Please use `insert_op` instead") - @staticmethod - def insert_op_before(op: Operation, new_op: Operation): - """Inserts a new operation before another operation.""" - Rewriter.insert_op(new_op, InsertPoint.before(op)) - @staticmethod def move_region_contents_to_new_regions(region: Region) -> Region: """Move the region blocks to a new region."""