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

Draft
wants to merge 243 commits into
base: master
Choose a base branch
from
Draft

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

wants to merge 243 commits into from

Conversation

Hugobros3
Copy link
Collaborator

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
  • opt_stack: ditto
  • simt2d is deleted with no immediate plans to bring it back
  • switch to if-tree lowering is broken
  • l2s is broken
  • s2s is broken

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