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

Remove Let, add a 'mem' operand class instead #41

Merged
merged 250 commits into from
Oct 6, 2024
Merged

Remove Let, add a 'mem' operand class instead #41

merged 250 commits into from
Oct 6, 2024

Conversation

Hugobros3
Copy link
Collaborator

@Hugobros3 Hugobros3 commented Aug 13, 2024

This removes the Let node and associated machinery (Variable, Block, ...), instead transitioning shady to be a unscheduled IR, à la Thorin. A "scheduler" analysis was added so printing and backends can place instructions.

To support this change, a number of additional refactors have been applied:

  • Anonymous lambdas/Cases have been removed and basic blocks are used instead.
  • The structured control flow instructions have been replaced with tail/terminator variants, which makes the CFG analysis simpler and probably sound. The new structured constructs have a "tail" block instead of relying on the outer Let's.
  • Primops are treated as side-effect free, which necessitated the removal/migration of all the ones that used to have side effects into either new nodes, or ...
  • Extended instructions: They work similar to primop but use a string+id, which maps 1:1 with SPIR-V's extended instructions. This is used to embed SPIR-V directly inside shady.
  • Frontend nodes are gone: Nodes such as Unbound or Dereference have been removed and a private set of extended instructions

Pending/TODO:

  • Mem2Reg pass has been deleted, must be rewritten simple version done
  • opt_stack: ditto
  • simt2d is deleted with no immediate plans to bring it back
  • switch to if-tree lowering is broken
  • l2s is broken mostly fixed
  • s2s is broken (needs testing)

@Hugobros3 Hugobros3 marked this pull request as ready for review September 24, 2024 07:24
@Hugobros3 Hugobros3 force-pushed the mem branch 2 times, most recently from 25b0457 to 7560752 Compare September 24, 2024 07:50
@Hugobros3 Hugobros3 merged commit 7560752 into master Oct 6, 2024
1 of 3 checks passed
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