Skip to content

[DirectX] Resource arrays IR cleanup #145432

Open
@hekota

Description

@hekota

After Clang code generation and LLVM optimizations, the code related to resource arrays will most likely require some changes in LLVM backend passes.

The existing DXILForwardHandleAccesses pass aims to eliminate redundant stores and loads from resource handle globals. However, it currently expects resource handles to be loaded from a global variable, which is not the case for resource array element handles.

Additionally, local resource arrays and their copies tend to generate IR code that includes resource handles stored in local variables (using alloca and lifetime markers), with load and store operations on those handles through an i32 type. These will need to be either cleaned up in the DXILForwardHandleAccesses pass, or changes may need to be made to Clang codegen for array copying or to subsequent LLVM array optimizations to eliminate these unwanted constructs. The scope of this work is currently TBD.

Depends on: #145424, #145425, #145426

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions