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

feat: support type casts #609

Open
DavePearce opened this issue Jan 27, 2025 · 0 comments
Open

feat: support type casts #609

DavePearce opened this issue Jan 27, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@DavePearce
Copy link
Collaborator

DavePearce commented Jan 27, 2025

Currently, the following is not compiled optimally:

(defpurefun ((vanishes! :@loob) x) x)
(defpurefun ((force-bin :binary :force) x) x)

(defcolumns (A :@loob) B C)
(defconstraint c1 ()
  (if (vanishes! (force-bin A))
      (vanishes! B)
      (vanishes! C)))

The issue is that :binary :force is essentially being ignored completely. Thus, the optimiser fails to realise that we can avoid the given inverse column in this example.

A challenge here, however, is that optimisation of normalisation expressions occurs at the MIR level. Thus, we need some way to communicate to this level that the user is guaranteeing a given expression is e.g. binary in this case.

@DavePearce DavePearce added the enhancement New feature or request label Jan 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant