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

Shubham Sandeep Rastogi via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 12 15:13:20 PDT 2024


================
@@ -580,6 +580,10 @@ rewriteSingleStoreAlloca(AllocaInst *AI, AllocaInfo &Info, LargeBlockInfo &LBI,
       if (DbgItem->isAddressOfVariable()) {
         ConvertDebugDeclareToDebugValue(DbgItem, Info.OnlyStore, DIB);
         DbgItem->eraseFromParent();
+      } else if (DbgItem->isValueOfVariable() &&
+                 DbgItem->getExpression()->startsWithDeref()) {
+        InsertDebugValueAtStoreLoc(DbgItem, Info.OnlyStore, DIB);
----------------
rastogishubham wrote:

Hi @SLTozer you are correct, sorry about the late update, I got caught up in other stuff and forgot about this patch, the code has been changed to remove the deref from the expression in `InsertDebugValueAtStoreLoc`

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


More information about the llvm-commits mailing list