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

Accomodate Seq in bind_expr, fission_after, add_loop, double fission #203

Merged
merged 7 commits into from
Jun 24, 2022

Conversation

yamaguchi1024
Copy link
Member

No description provided.

@yamaguchi1024 yamaguchi1024 enabled auto-merge (squash) June 24, 2022 00:42
@@ -1092,7 +1092,7 @@ def map_s(self, s):

if isinstance(s, (LoopIR.ForAll, LoopIR.Seq)):
body = self.process_block(s.body)
return [LoopIR.ForAll(s.iter, s.hi, body, s.eff, s.srcinfo)]
return [type(s)(s.iter, s.hi, body, s.eff, s.srcinfo)]
Copy link
Contributor

Choose a reason for hiding this comment

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

Use s.update(body=body)

@alexreinking
Copy link
Contributor

We have a helper for this. Might as well use it.

@@ -2154,17 +2154,17 @@ def map_s(self, s):
# body doesn't depend on the loop
# and the body is idempotent
if s.iter in _FV(pre) or not _is_idempotent(pre):
pre = [LoopIR.ForAll(s.iter, s.hi, pre, None, s.srcinfo)]
pre = [type(s)(s.iter, s.hi, pre, None, s.srcinfo)]
Copy link
Contributor

Choose a reason for hiding this comment

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

s.update(body=pre, eff=None)

@yamaguchi1024
Copy link
Member Author

Hmm isn't this okay? The helper is not used in other parts of this file

@alexreinking
Copy link
Contributor

Hmm isn't this okay? The helper is not used in other parts of this file

I didn't retroactively replace all of these with the helper, but that doesn't mean we shouldn't use it in new code.

@yamaguchi1024
Copy link
Member Author

I'll fix this ASAP!

@yamaguchi1024 yamaguchi1024 changed the title fix bind_expr Accomodate Seq in bind_expr, fission_after, add_loop, double fission Jun 24, 2022
@yamaguchi1024 yamaguchi1024 merged commit 95dbc78 into master Jun 24, 2022
@yamaguchi1024 yamaguchi1024 deleted the bind_expr branch June 24, 2022 19:05
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.

None yet

2 participants