working on toom-cook multiplication
[bigint-presentation-code.git] / src / bigint_presentation_code / register_allocator.py
index a22299f842badfdb4d48439907f7ec373b31ed52..b8269e4bc354f6c31b5433b10d19b71a39a38c1e 100644 (file)
@@ -6,20 +6,13 @@ this uses an algorithm based on:
 """
 
 from itertools import combinations
-from typing import TYPE_CHECKING, Generic, Iterable, Mapping, TypeVar
+from typing import Generic, Iterable, Mapping, TypeVar
 
 from nmutil.plain_data import plain_data
 
 from bigint_presentation_code.compiler_ir import (GPRRangeType, Op, RegClass,
                                                   RegLoc, RegType, SSAVal)
-from bigint_presentation_code.ordered_set import OFSet, OSet
-
-if TYPE_CHECKING:
-    from typing_extensions import final
-else:
-    def final(v):
-        return v
-
+from bigint_presentation_code.util import OFSet, OSet, final
 
 _RegType = TypeVar("_RegType", bound=RegType)