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 codegen for demoted operations #6134

Closed
3 of 4 tasks
strongoier opened this issue Sep 22, 2022 · 0 comments
Closed
3 of 4 tasks

Remove codegen for demoted operations #6134

strongoier opened this issue Sep 22, 2022 · 0 comments
Assignees
Labels
refactor Refactor of API or codebases

Comments

@strongoier
Copy link
Contributor

strongoier commented Sep 22, 2022

There's a mandatory demote_operations pass (https://github.com/taichi-dev/taichi/blob/master/taichi/transforms/demote_operations.cpp) which demotes high-level operations into low-level ones so that there's no need to handle these high-level ones in codegen of different backends. Those legacy codegen should be removed to keep the codebase clean.

@strongoier strongoier added the refactor Refactor of API or codebases label Sep 22, 2022
@taichi-gardener taichi-gardener moved this to Untriaged in Taichi Lang Sep 22, 2022
@strongoier strongoier self-assigned this Sep 22, 2022
strongoier added a commit that referenced this issue Sep 22, 2022
Issue: #6134

`floordiv` is already demoted and should not appear in codegen.
@strongoier strongoier moved this from Untriaged to In Progress in Taichi Lang Sep 23, 2022
strongoier added a commit that referenced this issue Sep 26, 2022
### Brief Summary

While I was removing redundant codegen for `shr` (#6134), I found that
augmented assign for `sar` was accidentally calling `shr`, so I fixed it
by the way.

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
strongoier added a commit that referenced this issue Oct 8, 2022
Issue:
#6141 (comment),
#6134

### Brief Summary

In SPIR-V there's actually `OpBitFieldUExtract` which does the job of
`BitExtractStmt` perfectly, so let's stop demoting `BitExtractStmt` and
let codegen handle it with the best instruction(s).
Repository owner moved this from In Progress to Done in Taichi Lang Oct 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Refactor of API or codebases
Projects
Status: Done
Development

No branches or pull requests

1 participant