Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat[next]: GTIR embedded and GTFN temporaries with new lowering #1648

Merged
merged 137 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
137 commits
Select commit Hold shift + click to select a range
b0d688a
Add support for IfStmt in ITIR
tehrengruber Sep 25, 2024
65a22fe
Initial version of FuseAsFieldOp
tehrengruber Sep 28, 2024
8a27d16
Merge branch 'main' into gtir_fuse_as_fieldop
tehrengruber Sep 28, 2024
3edc130
Move symbolic domain utilities out of global tmp pass into seperate m…
tehrengruber Sep 28, 2024
031e459
Merge branch 'gtir_if_stmt' into gtir_temporaries_pass
tehrengruber Sep 28, 2024
dd63122
feat[next]: gtir lowering of broadcasted scalars
havogt Oct 1, 2024
2d840cb
Merge origin/main
tehrengruber Oct 1, 2024
7172442
Second draft of temporary pass
tehrengruber Oct 1, 2024
3313191
Merge remote-tracking branch 'origin/main' into gtir_if_stmt
tehrengruber Oct 1, 2024
4a20973
Merge branch 'gtir_temporaries_pass' into gtir_temporaries2
tehrengruber Oct 2, 2024
f3cbc18
Merge branch 'gtir_fuse_as_fieldop' into gtir_temporaries2
tehrengruber Oct 2, 2024
d4f066a
Cleanup
tehrengruber Oct 2, 2024
9a69dea
Merge branch 'gtir_temporaries_pass' into gtir_temporaries2
tehrengruber Oct 2, 2024
c1038fa
Address review comments
tehrengruber Oct 3, 2024
31cd94e
Merge branch 'main' into gtir_if_stmt
tehrengruber Oct 3, 2024
160aeaf
Add type inference test for IfStmt
tehrengruber Oct 3, 2024
67682ed
Merge remote-tracking branch 'origin_tehrengruber/gtir_if_stmt' into …
tehrengruber Oct 3, 2024
881babf
Merge origin/main
tehrengruber Oct 3, 2024
2bf9231
Merge remote-tracking branch 'origin/main' into gtir_fuse_as_fieldop
tehrengruber Oct 4, 2024
19a2c5e
Cleanup
tehrengruber Oct 9, 2024
a6a010c
Merge gtir_fuse_as_fieldop
tehrengruber Oct 9, 2024
a57cb99
Merge branch 'main' into gtir_fuse_as_fieldop
tehrengruber Oct 9, 2024
b50b85a
Cleanup
tehrengruber Oct 9, 2024
e2e3fa1
Merge remote-tracking branch 'origin_tehrengruber/gtir_fuse_as_fieldo…
tehrengruber Oct 9, 2024
bb2f2b1
Cleanup
tehrengruber Oct 9, 2024
729968e
Cleanup
tehrengruber Oct 9, 2024
cdcaac0
Cleanup
tehrengruber Oct 9, 2024
9472502
Cleanup
tehrengruber Oct 9, 2024
01dd86e
Cleanup
tehrengruber Oct 9, 2024
e078b36
Cleanup
tehrengruber Oct 10, 2024
f0331cb
Cleanup
tehrengruber Oct 10, 2024
21d2fb5
Merge origin_tehrengruber/gtir_if_stmt
tehrengruber Oct 10, 2024
3bd3ad6
Merge remote-tracking branch 'origin/main' into gtir_temporaries_pass
tehrengruber Oct 10, 2024
61e9665
Cleanup
tehrengruber Oct 10, 2024
f9dff50
Cleanup
tehrengruber Oct 10, 2024
71f512f
Cleanup
tehrengruber Oct 10, 2024
6fb424f
Cleanup
tehrengruber Oct 10, 2024
7d809fb
Cleanup
tehrengruber Oct 10, 2024
c7b79c0
Cleanup
tehrengruber Oct 10, 2024
f16a961
Cleanup
tehrengruber Oct 10, 2024
3e3f9a1
Cleanup
tehrengruber Oct 10, 2024
edffd97
Cleanup
tehrengruber Oct 10, 2024
3196a11
Cleanup
tehrengruber Oct 10, 2024
6a4d227
Merge remote-tracking branch 'origin/main' into gtir_temporaries_pass
tehrengruber Oct 10, 2024
183139b
Merge branch 'gtir_temporaries_pass' into gtir_temporaries2
tehrengruber Oct 10, 2024
04f59dd
Inline lambda pass: ensure opcount preserving option works whether `i…
tehrengruber Oct 10, 2024
feab647
Retrigger CI
tehrengruber Oct 10, 2024
5869769
Merge branch 'fix_inline_lambda_opcount_preserving' into gtir_tempora…
tehrengruber Oct 10, 2024
376153f
Address review comments
tehrengruber Oct 11, 2024
b61be89
Merge branch 'gtir_fuse_as_fieldop' into gtir_temporaries2
tehrengruber Oct 11, 2024
52a1b90
Allow type inference without domain argument to `as_fieldop`
tehrengruber Oct 14, 2024
a1b4448
Cleanup
tehrengruber Oct 14, 2024
f93c8b4
Merge branch 'type_inf_before_domain_inf' into gtir_temporaries2
tehrengruber Oct 14, 2024
9684507
Merge origin/main
tehrengruber Oct 15, 2024
5b86f19
Remove comment
tehrengruber Oct 15, 2024
7784896
Merge branch 'gtir_temporaries_pass' into gtir_temporaries2
tehrengruber Oct 15, 2024
0e50214
Use GTIR in embedded and gtfn
tehrengruber Oct 15, 2024
068ff06
Cleanup
tehrengruber Oct 16, 2024
aaba729
Cleanup
tehrengruber Oct 16, 2024
6044d76
Cleanup
tehrengruber Oct 16, 2024
1dc9ebb
Cleanup
tehrengruber Oct 16, 2024
685bedb
Cleanup
tehrengruber Oct 16, 2024
378b3b3
Cleanup
tehrengruber Oct 16, 2024
83e5ce2
Cleanup
tehrengruber Oct 16, 2024
b3ae17b
Cleanup
tehrengruber Oct 16, 2024
4637b7a
Merge origin_tehrengruber/lower_broadcasted_scalars_to_fieldops
tehrengruber Oct 16, 2024
dbd71a9
Small fix
tehrengruber Oct 16, 2024
0990858
Merge branch 'main' into gtir_temporaries
tehrengruber Oct 16, 2024
da4a63c
Merge remote-tracking branch 'origin/main' into gtir_temporaries
tehrengruber Oct 16, 2024
c4b1ed8
Merge remote-tracking branch 'origin_tehrengruber/gtir_temporaries' i…
tehrengruber Oct 16, 2024
f545984
Remove superfluous test backend
tehrengruber Oct 16, 2024
0904d88
Cleanup
tehrengruber Oct 16, 2024
6f6c65b
Cleanup
tehrengruber Oct 16, 2024
606f662
Cleanup
tehrengruber Oct 16, 2024
b917011
Cleanup
tehrengruber Oct 16, 2024
6c9e8ab
Cleanup
tehrengruber Oct 16, 2024
320c7f8
Cleanup
tehrengruber Oct 17, 2024
b589346
Cleanup
tehrengruber Oct 17, 2024
309d58f
Merge branch 'gtir_temporaries_pass' into gtir_temporaries
tehrengruber Oct 17, 2024
4d2b3da
Fix format
tehrengruber Oct 17, 2024
cfb59d7
Merge branch 'main' into gtir_temporaries_pass
tehrengruber Oct 17, 2024
1fe44e0
Merge branch 'gtir_temporaries_pass' into gtir_temporaries
tehrengruber Oct 17, 2024
ab5a6a2
Merge remote-tracking branch 'origin_tehrengruber/gtir_temporaries_pa…
tehrengruber Oct 18, 2024
6072d53
Merge commit 'cb77ccb85c1d5baa83720493c626a66c0c116451' into gtir_tem…
tehrengruber Oct 18, 2024
821af59
Merge origin/main
tehrengruber Oct 18, 2024
70c0dff
Fix scalar let in gtfn
tehrengruber Oct 19, 2024
108af05
Fix some tests
tehrengruber Oct 20, 2024
7380d6e
Fix
tehrengruber Oct 20, 2024
c268ee1
Fix some tests
tehrengruber Oct 20, 2024
c5b0171
Address review comments
tehrengruber Oct 21, 2024
bba6aa4
Allow partial type inference in ITIR
tehrengruber Oct 24, 2024
840c004
Merge remote-tracking branch 'origin/main' into allow_partial_type_in…
tehrengruber Oct 24, 2024
f9fc5c5
Small fix
tehrengruber Oct 24, 2024
c241bc4
Add tests
tehrengruber Oct 28, 2024
e120849
Merge origin/main
tehrengruber Oct 28, 2024
45f41be
Address review comments
tehrengruber Oct 28, 2024
fccd43b
Fix tests
tehrengruber Oct 28, 2024
1874eba
Fix tests
tehrengruber Nov 5, 2024
8685731
Merge origin/main
tehrengruber Nov 5, 2024
dd5bfa7
Fix tests
tehrengruber Nov 5, 2024
8f1e84a
Fix tests
tehrengruber Nov 5, 2024
d53d3bb
Fix tests
tehrengruber Nov 5, 2024
4bfef54
Fix tests
tehrengruber Nov 5, 2024
78b7a98
Fix tests
tehrengruber Nov 5, 2024
88a7660
Fix tests
tehrengruber Nov 5, 2024
1b79b3a
Fix tests
tehrengruber Nov 5, 2024
b6b603e
Bump CI version to 22.04
tehrengruber Nov 5, 2024
5beccf0
Bump CI version to 22.04
tehrengruber Nov 5, 2024
deca907
Bump CI version to 22.04
tehrengruber Nov 5, 2024
af9d776
Bump CI version to 22.04
tehrengruber Nov 5, 2024
8cb36da
Merge origin/main
tehrengruber Nov 5, 2024
ee0b94a
Fix failing dace tests
tehrengruber Nov 5, 2024
270e173
Address review comments
tehrengruber Nov 5, 2024
8e2ba0c
Revert CI changes & skip failing test
tehrengruber Nov 8, 2024
229d3ac
Merge origin/main
tehrengruber Nov 8, 2024
580cb79
Fix format
tehrengruber Nov 8, 2024
c67d355
Ugly fix
tehrengruber Nov 8, 2024
79ab838
Format
tehrengruber Nov 8, 2024
d53fda9
Small fix
tehrengruber Nov 8, 2024
24c3e87
Bump gridtools-cpp to 2.3.7 in preperation of #1648
tehrengruber Nov 11, 2024
04f110f
Merge branch 'bump_gridtools' into gtir_temporaries
tehrengruber Nov 11, 2024
c399f65
Merge remote-tracking branch 'origin/main' into gtir_temporaries
tehrengruber Nov 11, 2024
0faa7ef
Test tuple fix in gridtools
tehrengruber Nov 11, 2024
8e8a0a1
Fix typo
tehrengruber Nov 11, 2024
e03dd38
Fix ITIR program hash stability
tehrengruber Nov 12, 2024
7a4c692
Merge branch 'fix_itir_hash_stability' into gtir_temporaries
tehrengruber Nov 12, 2024
405cbb0
Revert "Fix typo"
tehrengruber Nov 13, 2024
4c27279
Revert "Test tuple fix in gridtools"
tehrengruber Nov 13, 2024
a666eef
Test 2.3.8
tehrengruber Nov 13, 2024
2d6464f
Fix test skip matrix
tehrengruber Nov 14, 2024
4b67a99
Fix format
tehrengruber Nov 14, 2024
af2ed5f
Address review comments
tehrengruber Nov 14, 2024
52df315
Merge remote-tracking branch 'origin/main' into gtir_temporaries
tehrengruber Nov 14, 2024
262ffdd
Merge origin/main
tehrengruber Nov 14, 2024
16f143f
Address review comments
tehrengruber Nov 15, 2024
75695d9
Address review comments
tehrengruber Nov 15, 2024
f3b1c6c
Merge origin/main
tehrengruber Nov 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ repos:
- id: check-merge-conflict
- id: check-toml
- id: check-yaml
- id: debug-statements
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is already handled by ruff where it is additionally configurable on a line-by-line basis.


- repo: https://github.com/astral-sh/ruff-pre-commit
##[[[cog
Expand Down
14 changes: 13 additions & 1 deletion src/gt4py/next/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from gt4py._core import definitions as core_defs
from gt4py.next import allocators as next_allocators
from gt4py.next.ffront import (
foast_to_gtir,
foast_to_itir,
foast_to_past,
func_to_foast,
Expand Down Expand Up @@ -76,7 +77,7 @@ class Transforms(workflow.MultiWorkflow[INPUT_PAIR, stages.CompilableProgram]):
)

foast_to_itir: workflow.Workflow[AOT_FOP, itir.Expr] = dataclasses.field(
default_factory=foast_to_itir.adapted_foast_to_itir_factory
default_factory=foast_to_gtir.adapted_foast_to_gtir_factory
)

field_view_op_to_prog: workflow.Workflow[AOT_FOP, AOT_PRG] = dataclasses.field(
Expand Down Expand Up @@ -134,6 +135,17 @@ def step_order(self, inp: INPUT_PAIR) -> list[str]:

DEFAULT_TRANSFORMS: Transforms = Transforms()

# FIXME[#1582](havogt): remove after refactoring to GTIR
# note: this step is deliberately placed here, such that the cache is shared
_foast_to_itir_step = foast_to_itir.adapted_foast_to_itir_factory(cached=True)
tehrengruber marked this conversation as resolved.
Show resolved Hide resolved
LEGACY_TRANSFORMS: Transforms = Transforms(
past_to_itir=past_to_itir.past_to_itir_factory(to_gtir=False),
foast_to_itir=_foast_to_itir_step,
field_view_op_to_prog=foast_to_past.operator_to_program_factory(
foast_to_itir_step=_foast_to_itir_step
),
)


# TODO(tehrengruber): Rename class and `executor` & `transforms` attribute. Maybe:
# `Backend` -> `Toolchain`
Expand Down
6 changes: 3 additions & 3 deletions src/gt4py/next/ffront/foast_to_past.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from gt4py.eve import utils as eve_utils
from gt4py.next.ffront import (
dialect_ast_enums,
foast_to_itir,
foast_to_gtir,
program_ast as past,
stages as ffront_stages,
type_specifications as ts_ffront,
Expand Down Expand Up @@ -68,7 +68,7 @@ class OperatorToProgram(workflow.Workflow[AOT_FOP, AOT_PRG]):
... def copy(a: gtx.Field[[IDim], gtx.float32]) -> gtx.Field[[IDim], gtx.float32]:
... return a

>>> op_to_prog = OperatorToProgram(foast_to_itir.adapted_foast_to_itir_factory())
>>> op_to_prog = OperatorToProgram(foast_to_gtir.adapted_foast_to_gtir_factory())

>>> compile_time_args = arguments.CompileTimeArgs(
... args=tuple(param.type for param in copy.foast_stage.foast_node.definition.params),
Expand Down Expand Up @@ -169,7 +169,7 @@ def operator_to_program_factory(
) -> workflow.Workflow[AOT_FOP, AOT_PRG]:
"""Optionally wrap `OperatorToProgram` in a `CachedStep`."""
wf: workflow.Workflow[AOT_FOP, AOT_PRG] = OperatorToProgram(
foast_to_itir_step or foast_to_itir.adapted_foast_to_itir_factory()
foast_to_itir_step or foast_to_gtir.adapted_foast_to_gtir_factory()
)
if cached:
wf = workflow.CachedStep(wf, hash_function=ffront_stages.fingerprint_stage)
Expand Down
2 changes: 1 addition & 1 deletion src/gt4py/next/ffront/past_to_itir.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def past_to_itir(inp: AOT_PRG, to_gtir: bool = False) -> stages.CompilableProgra

# FIXME[#1582](havogt): remove `to_gtir` arg after refactoring to GTIR
def past_to_itir_factory(
cached: bool = True, to_gtir: bool = False
cached: bool = True, to_gtir: bool = True
) -> workflow.Workflow[AOT_PRG, stages.CompilableProgram]:
wf = workflow.make_step(functools.partial(past_to_itir, to_gtir=to_gtir))
if cached:
Expand Down
23 changes: 17 additions & 6 deletions src/gt4py/next/iterator/ir_utils/domain_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

import dataclasses
import functools
from typing import Any, Literal, Mapping
from typing import Any, Literal, Mapping, Optional

import gt4py.next as gtx
from gt4py.next import common
Expand Down Expand Up @@ -93,6 +93,9 @@ def translate(
...,
],
offset_provider: common.OffsetProvider,
#: A dictionary mapping axes names to their length. See
#: func:`gt4py.next.iterator.transforms.infer_domain.infer_expr` for more details.
symbolic_domain_sizes: Optional[dict[str, str]] = None,
) -> SymbolicDomain:
dims = list(self.ranges.keys())
new_ranges = {dim: self.ranges[dim] for dim in dims}
Expand All @@ -119,18 +122,24 @@ def translate(
trace_shifts.Sentinel.ALL_NEIGHBORS,
trace_shifts.Sentinel.VALUE,
]
# note: ugly but cheap re-computation, but should disappear
horizontal_sizes = _max_domain_sizes_by_location_type(offset_provider)
horizontal_sizes: dict[str, itir.Expr]
if symbolic_domain_sizes is not None:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is used in the blue-line to inject the size of the temporaries.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a comment to explain what's going on.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a docstring to infer_expr and a back reference to that docstring here.

horizontal_sizes = {k: im.ref(v) for k, v in symbolic_domain_sizes.items()}
else:
# note: ugly but cheap re-computation, but should disappear
horizontal_sizes = {
k: im.literal(str(v), itir.INTEGER_INDEX_BUILTIN)
for k, v in _max_domain_sizes_by_location_type(offset_provider).items()
}

old_dim = nbt_provider.origin_axis
new_dim = nbt_provider.neighbor_axis

assert new_dim not in new_ranges or old_dim == new_dim

# TODO(tehrengruber): Do we need symbolic sizes, e.g., for ICON?
new_range = SymbolicRange(
im.literal("0", itir.INTEGER_INDEX_BUILTIN),
im.literal(str(horizontal_sizes[new_dim.value]), itir.INTEGER_INDEX_BUILTIN),
horizontal_sizes[new_dim.value],
)
new_ranges = dict(
(dim, range_) if dim != old_dim else (new_dim, new_range)
Expand All @@ -140,7 +149,9 @@ def translate(
raise AssertionError()
return SymbolicDomain(self.grid_type, new_ranges)
elif len(shift) > 2:
return self.translate(shift[0:2], offset_provider).translate(shift[2:], offset_provider)
return self.translate(shift[0:2], offset_provider, symbolic_domain_sizes).translate(
shift[2:], offset_provider, symbolic_domain_sizes
)
else:
raise AssertionError("Number of shifts must be a multiple of 2.")

Expand Down
5 changes: 2 additions & 3 deletions src/gt4py/next/iterator/ir_utils/ir_makers.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from typing import Callable, Optional, Union

from gt4py._core import definitions as core_defs
from gt4py.eve.extended_typing import Dict, Tuple
from gt4py.next import common
from gt4py.next.iterator import ir as itir
from gt4py.next.type_system import type_specifications as ts, type_translation
Expand Down Expand Up @@ -412,7 +411,7 @@ def _impl(*its: itir.Expr) -> itir.FunCall:

def domain(
grid_type: Union[common.GridType, str],
ranges: Dict[Union[common.Dimension, str], Tuple[itir.Expr, itir.Expr]],
ranges: dict[Union[common.Dimension, str], tuple[itir.Expr, itir.Expr]],
) -> itir.FunCall:
"""
>>> str(
Expand Down Expand Up @@ -446,7 +445,7 @@ def domain(
)


def as_fieldop(expr: itir.Expr, domain: Optional[itir.Expr] = None) -> call:
def as_fieldop(expr: itir.Expr | str, domain: Optional[itir.Expr] = None) -> call:
"""
Create an `as_fieldop` call.

Expand Down
3 changes: 1 addition & 2 deletions src/gt4py/next/iterator/transforms/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@

from gt4py.next.iterator.transforms.pass_manager import (
ITIRTransform,
LiftMode,
apply_common_transforms,
apply_fieldview_transforms,
)


__all__ = ["apply_common_transforms", "apply_fieldview_transforms", "LiftMode", "ITIRTransform"]
__all__ = ["apply_common_transforms", "apply_fieldview_transforms", "ITIRTransform"]
52 changes: 25 additions & 27 deletions src/gt4py/next/iterator/transforms/collapse_list_get.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
# SPDX-License-Identifier: BSD-3-Clause

from gt4py import eve
from gt4py.next.iterator import ir
from gt4py.next.iterator import ir as itir
from gt4py.next.iterator.ir_utils import common_pattern_matcher as cpm, ir_makers as im


class CollapseListGet(eve.PreserveLocationVisitor, eve.NodeTranslator):
Expand All @@ -18,32 +19,29 @@ class CollapseListGet(eve.PreserveLocationVisitor, eve.NodeTranslator):
- `list_get(i, make_const_list(e))` -> `e`
"""

def visit_FunCall(self, node: ir.FunCall, **kwargs) -> ir.Node:
def visit_FunCall(self, node: itir.FunCall, **kwargs) -> itir.Node:
node = self.generic_visit(node)
if node.fun == ir.SymRef(id="list_get"):
if isinstance(node.args[1], ir.FunCall):
if node.args[1].fun == ir.SymRef(id="neighbors"):
offset_tag = node.args[1].args[0]
offset_index = (
ir.OffsetLiteral(value=int(node.args[0].value))
if isinstance(node.args[0], ir.Literal)
else node.args[
0
] # else-branch: e.g. SymRef from unroll_reduce, TODO(havogt): remove when we replace unroll_reduce by list support in gtfn
)
it = node.args[1].args[1]
return ir.FunCall(
fun=ir.SymRef(id="deref"),
args=[
ir.FunCall(
fun=ir.FunCall(
fun=ir.SymRef(id="shift"), args=[offset_tag, offset_index]
),
args=[it],
)
],
)
if node.args[1].fun == ir.SymRef(id="make_const_list"):
return node.args[1].args[0]
if cpm.is_call_to(node, "list_get"):
if cpm.is_call_to(node.args[1], "if_"):
tehrengruber marked this conversation as resolved.
Show resolved Hide resolved
list_idx = node.args[0]
cond, true_val, false_val = node.args[1].args
return im.if_(
cond,
self.visit(im.call("list_get")(list_idx, true_val)),
self.visit(im.call("list_get")(list_idx, false_val)),
)
if cpm.is_call_to(node.args[1], "neighbors"):
offset_tag = node.args[1].args[0]
offset_index = (
itir.OffsetLiteral(value=int(node.args[0].value))
if isinstance(node.args[0], itir.Literal)
else node.args[
0
] # else-branch: e.g. SymRef from unroll_reduce, TODO(havogt): remove when we replace unroll_reduce by list support in gtfn
)
it = node.args[1].args[1]
return im.deref(im.shift(offset_tag, offset_index)(it))
if cpm.is_call_to(node.args[1], "make_const_list"):
return node.args[1].args[0]

return node
Loading
Loading