diff --git a/tests/test_assembly_arg_str.py b/tests/test_assembly_arg_str.py index 0c31998130..8552b2c805 100644 --- a/tests/test_assembly_arg_str.py +++ b/tests/test_assembly_arg_str.py @@ -1,7 +1,6 @@ import pytest from xdsl.dialects.arm.assembly import assembly_arg_str -from xdsl.dialects.arm.attrs import LabelAttr from xdsl.dialects.arm.register import IntRegisterType from xdsl.dialects.test import TestType from xdsl.utils.test_value import TestSSAValue @@ -12,11 +11,6 @@ def test_assembly_arg_str_ARMRegister(): assert assembly_arg_str(arg) == "x0" -def test_assembly_arg_str_LabelAttr(): - arg = LabelAttr("main") - assert assembly_arg_str(arg) == "main" - - def test_assembly_arg_str_SSAValue_valid(): arg = TestSSAValue(IntRegisterType("x1")) assert assembly_arg_str(arg) == "x1" diff --git a/xdsl/dialects/arm/assembly.py b/xdsl/dialects/arm/assembly.py index 432e650caf..2ae9e20380 100644 --- a/xdsl/dialects/arm/assembly.py +++ b/xdsl/dialects/arm/assembly.py @@ -4,9 +4,7 @@ from xdsl.dialects.builtin import StringAttr from xdsl.ir import SSAValue -from .attrs import LabelAttr - -AssemblyInstructionArg: TypeAlias = ARMRegisterType | LabelAttr | SSAValue +AssemblyInstructionArg: TypeAlias = ARMRegisterType | SSAValue def append_comment(line: str, comment: StringAttr | None) -> str: @@ -22,9 +20,6 @@ def assembly_arg_str(arg: AssemblyInstructionArg) -> str: if isinstance(arg, ARMRegisterType): reg = arg.register_name return reg - elif isinstance(arg, LabelAttr): - label = arg.data - return label else: # SSAValue if isinstance(arg.type, ARMRegisterType): reg = arg.type.register_name diff --git a/xdsl/dialects/arm/attrs.py b/xdsl/dialects/arm/attrs.py deleted file mode 100644 index b4976805c2..0000000000 --- a/xdsl/dialects/arm/attrs.py +++ /dev/null @@ -1,18 +0,0 @@ -from xdsl.ir import Data -from xdsl.irdl import irdl_attr_definition -from xdsl.parser import AttrParser -from xdsl.printer import Printer - - -@irdl_attr_definition -class LabelAttr(Data[str]): - name = "arm.label" - - @classmethod - def parse_parameter(cls, parser: AttrParser) -> str: - with parser.in_angle_brackets(): - return parser.parse_str_literal() - - def print_parameter(self, printer: Printer) -> None: - with printer.in_angle_brackets(): - printer.print_string_literal(self.data)