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

Demonstrate splitting struct into individual scalars #150

Draft
wants to merge 1 commit into
base: swarm_backend
Choose a base branch
from

Conversation

VictorYing
Copy link
Collaborator

@VictorYing VictorYing commented Apr 9, 2021

This us a fairly mechanical transformation to the generated C++:

  • Add local variable definitions at the top of the lambda body to extract the fields from the struct.
  • Avoid any direct use of the struct elsewhere in the lambda body: replace any access to the fields of the struct to an access to the corresponding local scalar variable.

After this transformation, SCC/T4 does a slightly better job packing registers and deciding how to transfer values between the fine-grained tasks created by SCC/T4 within the lambda body, and this manages to avoid one instance of a mem_runner (i.e., transfer via the heap) for one task spawn associated with the for loop inside of case 1.

@VictorYing VictorYing self-assigned this Apr 9, 2021
@VictorYing VictorYing marked this pull request as draft April 9, 2021 14:17
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.

1 participant