llvm-project
fa1cda8f - [DirectX] Mark `dx.resource.getpointer` as convergent (#182099)

Commit
17 hours ago
[DirectX] Mark `dx.resource.getpointer` as convergent (#182099) By marking `dx.resource.getpointer` as convergent, we are able to prevent unwanted code transforms that make resource access look illegal. Namely, this prevents the creation of a ptr into a resource handle to be moved throughout control flow (eg in `SimplifyCFG`), further preventing sink/hoist optimizations on the returned ptr during `InstCombine`. Previously, these transforms were undone by the `phiNodeReplacement` function in `dxil-resource-access`. However, in general, we would like to follow a policy of preventing these transforms from occurring rather than having to undo the work. This change is aligned with this. This is a pre-requisite to resolving https://github.com/llvm/llvm-project/issues/165288.
Author
Parents
Loading