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

Add DXIR docs #3378

Closed
seanbaxter opened this issue Jan 21, 2021 · 1 comment
Closed

Add DXIR docs #3378

seanbaxter opened this issue Jan 21, 2021 · 1 comment

Comments

@seanbaxter
Copy link
Contributor

#3375

I just started writing a DXIL backend. Immediately you get into the issue of trying to lower LLVM IO down to BufferLoad ops. DXIL.rst has some snippets where resources are shows an GlobalVariables with addrspaces, suggesting that normal LLVM can be used to access them at this DXIR level, and a DXC pass lowers that to the BufferLoad ops.

Without knowing what DXIR actually is, it's hard to know what to emit. If I target DXIL directly, then I reproduce all the work you already did in extending LLVM with the DXIR->DXIL passes.

If the goal is to make DXIL targetable by other frontends, we totally need DXIR docs. It's an undue burden to have to reverse engineer IDxcOptimizer to try to learn what it even does.

If I had DXIR docs (nothing as formal as a specification, but docs intended to help other frontend people) I could do a pretty good C+->DXIL backend in a couple of weeks.

@llvm-beanz
Copy link
Collaborator

Hi @seanbaxter,

This issue has kinda sat around for a while without any action. I don't think it is likely that we're going to document DXC's initial IR format.

We are planning to document the HLSL IR format for upstream LLVM as we add DXIL support there. You can find the stubs of those docs here.

I realize this doesn't solve your immediate need, but we're unlikely to prioritize documenting DXC's existing IR over implementing a cleaner IR approach in Clang and documenting that as we go.

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

2 participants