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

Improve RemoveFunctionDuplicates to handle parametric functions #1204

Closed
wants to merge 4 commits into from

Conversation

mtdudek
Copy link
Contributor

@mtdudek mtdudek commented Nov 24, 2023

This PR fixes issue #1202 @proppy

…ll by multiple sources

This commit adds a test that checks DSLX to IR conversion
when a parametric function is called by
both non parametric function and process.

The test uses IR conversion GetOrder function,
as it’s a case when IR "top" value is undefined.
This occurs when jitting or
running ir_conversion_main without specifying "top" argument.

In this test `main.next` should be a top level function,
with `call_parametric_from_no_parametric` and `parametric_fn` as callees.

Signed-off-by: Maciej Dudek <mdudek@antmicro.com>
…rameters are equal

Signed-off-by: Maciej Dudek <mdudek@antmicro.com>
Signed-off-by: Maciej Dudek <mdudek@antmicro.com>
@mtdudek
Copy link
Contributor Author

mtdudek commented Nov 30, 2023

@proppy I've updated this PR with suggested improvements

@mtdudek
Copy link
Contributor Author

mtdudek commented Jan 17, 2024

@proppy we really need this or something similar to get into mainline, as it's blocking work in #1211

@proppy
Copy link
Member

proppy commented Jan 18, 2024

I don't see change to the interpreter, is that expected?

@proppy proppy requested a review from meheff January 18, 2024 08:25
Signed-off-by: Maciej Dudek <mdudek@antmicro.com>
@mtdudek
Copy link
Contributor Author

mtdudek commented Jan 18, 2024

I believe, this PR fixes issue with interpreter.
I think interpreter was doing jit conversion underneath, which requires conversion order
and that in turned triggered the same code path as DSLX to IR conversion does.

lpawelcz pushed a commit to antmicro/xls that referenced this pull request Feb 21, 2024
google#1204

xls/dslx/ir_conversion: Remove parametric functions when names and parameters are equal

Internal-tag: [#52186]
Signed-off-by: Maciej Dudek <mdudek@antmicro.com>

xls/dslx/ir_conversion: Add test with implicit parametric function call by multiple sources

This commit adds a test that checks DSLX to IR conversion
when a parametric function is called by
both non parametric function and process.

The test uses IR conversion GetOrder function,
as it’s a case when IR "top" value is undefined.
This occurs when jitting or
running ir_conversion_main without specifying "top" argument.

In this test `main.next` should be a top level function,
with `call_parametric_from_no_parametric` and `parametric_fn` as callees.

Internal-tag: [#52186]
Signed-off-by: Maciej Dudek <mdudek@antmicro.com>

review: Fix names

Internal-tag: [#52186]
Signed-off-by: Maciej Dudek <mdudek@antmicro.com>
@mtdudek
Copy link
Contributor Author

mtdudek commented Feb 23, 2024

Closing, no longer applicable

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

Successfully merging this pull request may close these issues.

2 participants