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

Provide a convenient way to retrieve a result type from an instruction #87

Open
Y-Nak opened this issue Nov 24, 2024 · 0 comments
Open
Labels

Comments

@Y-Nak
Copy link
Collaborator

Y-Nak commented Nov 24, 2024

It would be convenient to retrieve the result type from instructions. This functionality would also enable the FunctionBuilder to automatically insert a result value when a user adds an instruction, if desired.

The result type typically depends on the instruction's arguments (and occasionally on the ISA), making it impossible to determine statically. (In other words, a simple extension of the Inst macro would not be sufficient.)

The most straightforward approach might be to introduce a new trait and make it a super trait of the Inst trait.
While I haven't fully explored this approach yet, I’m creating this issue as a placeholder for further discussion and consideration.

@Y-Nak Y-Nak added the ir label Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant