Skip to content

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