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

Do not keep "global" SPIR-V instructions in MachineFunctions #170

Open
iliya-diyachkov opened this issue Apr 22, 2022 · 0 comments
Open
Assignees

Comments

@iliya-diyachkov
Copy link
Contributor

We probably can avoid keeping copies of "global" SPIR-V instructions in each MachineFunction, at least for some of them. For this purpose we need to implement a special cache for such "global" instructions in SPIRVGlobalRegister. For this implementation we need to find out how to

  • print the instructions from the cache to represent them in MachineFunction dumps,
  • what data structures should represent cached instructions (candidates so far are MCInst or new custom class),
  • how safely link cached instructions with other MachineInstrs in different MachineFunctions.
    I think we can do this for OpDecorate and OpName instructions, then also support Types/Consts/GVars/Funcs and others if applicable to them.
@iliya-diyachkov iliya-diyachkov self-assigned this May 5, 2022
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

No branches or pull requests

1 participant