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

Remove arg_ordering legacy code #2874

Open
sergisiso opened this issue Jan 27, 2025 · 1 comment
Open

Remove arg_ordering legacy code #2874

sergisiso opened this issue Jan 27, 2025 · 1 comment

Comments

@sergisiso
Copy link
Collaborator

Currently we store 2 duplicated args list: _arglist and _psyir_arglist. After #1010 the former could be eliminated and the append(cell_ref_name) should be fully deleted in favour of the already present psyir_append(cell_ref)

This represent changes in quite a few places because many method return both (str and reference) to populate each list. For example, "cell_ref_name" should be "cell_ref" and only return the Reference. Additionally, all these methods have a "var_accesses" argument. They can now be deleted in favour of doing cell_ref.reference_accesses(...) at the caller site, as all information should be in the tree now.

@sergisiso
Copy link
Collaborator Author

Also, why do we keep state, could not this be done at the beginning (possibly the Collections.declarations and initialisation as well) when we create the PSy-layer and store in the symbol_table.argument_list?

Then we wouldn't need things like

# KernCallArgList creates symbols (sometimes with wrong type), we don't
# want those to be kept in the SymbolTable, so we copy the symbol table
tmp_symtab = self.ancestor(InvokeSchedule).symbol_table.deep_copy()
create_arg_list._forced_symtab = tmp_symtab
create_arg_list.generate(var_accesses)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant