[llvm] Handle #dbg_values in SROA. (PR #94070)

Shubham Sandeep Rastogi via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 10 10:27:58 PDT 2024


================
@@ -5178,6 +5188,7 @@ bool SROA::splitAlloca(AllocaInst &AI, AllocaSlices &AS) {
       };
       for_each(findDbgDeclares(Fragment.Alloca), RemoveOne);
       for_each(findDVRDeclares(Fragment.Alloca), RemoveOne);
+      for_each(findDVRValues(Fragment.Alloca), RemoveOne);
----------------
rastogishubham wrote:

As @SLTozer said in [this thread](https://github.com/llvm/llvm-project/pull/94068#discussion_r1625972446)

We do not want to get assigns, we only want DVRDeclares, DbgDeclares, and now DVRValues, so this usage of `findDVRValues` is correct.

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


More information about the llvm-commits mailing list