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

Sparsebit improvements #38

Closed

Conversation

felixwiemuth
Copy link
Contributor

  • Remove remainders from an earlier refactoring (the local variable _isDataBoundByPC is not used)

    • The check for this variable in UserRuntimeZero was thus always false
    • The variable was used in the runtime operation join, to only apply joins if data is not
      bounded by PC. However, the branching to avoid such joins is already inserted by Stack2JS,
      thus it is redundant here and probably a remainder from earlier refactoring.
    • The runtime function wrap_block_rhs is redundant. It was used in the context of updating
      the blocking label through code generated in Stack2JS. It just returned the label to set
      the blocking label to, if the sparse bit is not set, and the current blocking label otherwise.
      Again this optimization is unnecessary here, as Stack2JS already makes sure that joins are not
      executed, and the call to this function itself occurs under a conditional that checks the
      sparse bit.
  • Instead of checking data bounds in the runtime and setting the sparse slot through code
    generated by Stack2JS, this is now simplified by doing it completely in the runtime with
    the functions

    • updateSparseBitOnEntry(x: Level)
    • updateSparseBitOnReturn()
  • Use consistent naming: use "sparse bit" all places, instead of "bound slot" etc.

  • Make code in Stack2JS less redundant

- Remove remainders from an earlier refactoring (local variable `_isDataBoundByPC` is not used)
  - The check for this variable in UserRuntimeZero was thus always false
  - However, calls to join (label groups) are already put under a conditional checking the sparse bit in the Stack2JS phase
  - Also `wrap_block_rhs` seems to already only occour under such a conditional generated by Stack2JS, so that the blocking label is only updated when the sparse bit is not set. The function wrap_block_rhs thus becomes redundant, as it only returns its argument.
- Make code less redundant
- Use consistent naming: use "sparse bit" in all places, instead of "bound slot" etc.
@felixwiemuth felixwiemuth changed the base branch from master to dev August 14, 2024 16:42
@aslanix
Copy link
Contributor

aslanix commented Aug 23, 2024

I see that on my side this is failing tests lclear2 getPC, and the manyprocs is hanging. Could it be that the refactoring is not taking into account the inner workings of the clearance labels?

@aslanix aslanix closed this Aug 23, 2024
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