Now only DXILTranslateMetadata uses DXILResources, so DXILResourceWrapper is only used by DXILTranslateMetadata.
Once we add lower for createHandle, DXILResourceWrapper will be used in more passes.
Also we can add resource index allocation in DXILResourceWrapper.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/DirectX/DXILResource.cpp | ||
---|---|---|
232 | How difficult would it be go make the printed output here look more like DXC's disassembly output? It would be very convenient if we could use the printer pass to generate the disassembly printing too. | |
llvm/lib/Target/DirectX/DXILResource.h | ||
57 | Maybe rather than print we make these dump functions that default to dbgs(), then we can print them in the debugger. | |
llvm/lib/Target/DirectX/DXILResourceAnalysis.h | ||
42 | This being a pointer is unfortunate. If you change dxil::Resources to not store a reference to the module (which it probably doesn't need), you could add a public collect method and change it to have a constructor that takes the module and a default constructor that doesn't collect the resources. |
llvm/lib/Target/DirectX/DXILResource.cpp | ||
---|---|---|
70 | Instead of a static array if you use a switch statement we don't need the asserts above. | |
101 | Using a switch here makes sense too. | |
233 | "comment" is a lot longer to write than just adding a ; to the front of the lines, and just including it in the string avoids double-calling operator<< | |
348 | here too | |
llvm/lib/Target/DirectX/DXILResource.h | ||
84 | ||
85 | ||
115 |
llvm/lib/Target/DirectX/DXILResource.h | ||
---|---|---|
165 | Include llvm/Support/Compiler.h so that LLVM_DUMP_METHOD is properly defined to make the dump method not stripped in debug builds. |
A few last really nitpicky whitespace issues. Otherwise looks good.
llvm/lib/Target/DirectX/DXILResource.cpp | ||
---|---|---|
347 | nit: please add a blank line between functions. | |
llvm/lib/Target/DirectX/DXILResourceAnalysis.cpp | ||
28 | nit: blank line here too | |
47 | nit: blank line here too | |
llvm/lib/Target/DirectX/DXILTranslateMetadata.cpp | ||
31–36 | nit: blank lines before and after this function too. |
Maybe rather than print we make these dump functions that default to dbgs(), then we can print them in the debugger.