Skip to content

Commit

Permalink
Revert "dialects (arm): add LabelAttr (#3745)" (#3746)
Browse files Browse the repository at this point in the history
This reverts commit 64f809b. (Removes
LabelAttr)
  • Loading branch information
emmau678 authored Jan 13, 2025
1 parent 64f809b commit 14578f1
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 30 deletions.
6 changes: 0 additions & 6 deletions tests/test_assembly_arg_str.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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"
Expand Down
7 changes: 1 addition & 6 deletions xdsl/dialects/arm/assembly.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
18 changes: 0 additions & 18 deletions xdsl/dialects/arm/attrs.py

This file was deleted.

0 comments on commit 14578f1

Please sign in to comment.