[llvm] [DirectX] Remove lifetime intrinsics and run Dead Store Elimination (PR #152636)

Deric C. via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 11 18:50:59 PDT 2025


================
@@ -78,6 +82,17 @@ static bool forwardHandleAccesses(Function &F, DominatorTree &DT) {
         case Intrinsic::dx_resource_handlefromimplicitbinding:
           processHandle(II, HandleMap);
           break;
+        // Note: Lifetime intrinsics do not show up as users of an Alloca.
+        // As a result we walk the whole function to find the lifetimes and
+        // store them so that we may delete the alloca matches
----------------
Icohedron wrote:

The loop on 124 can also end early before encounters the lifetime intrinsics (if you have removed line 119 that removes them before the loop).

https://github.com/llvm/llvm-project/pull/152636


More information about the llvm-commits mailing list