[PATCH] D13230: Move dbg.declare intrinsics when merging and replacing allocas.

Evgeniy Stepanov via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 28 16:11:12 PDT 2015


eugenis created this revision.
eugenis added reviewers: echristo, dblaikie, samsonov.
eugenis added a subscriber: llvm-commits.
eugenis set the repository for this revision to rL LLVM.

Place new and updated dbg.declare calls immediately after the corresponding alloca.

Current code in replaceDbgDeclareForAlloca puts the new dbg.declare at the end of the basic block. LLVM codegen has problems emitting debug info in a situation when dbg.declare appears after all uses of the variable. This usually kinda works for inlining and ASan (two users of this function) but not for SafeStack. See http://reviews.llvm.org/D13178, which depends on this patch (and includes a part of it for now).


Repository:
  rL LLVM

http://reviews.llvm.org/D13230

Files:
  lib/Transforms/IPO/Inliner.cpp
  lib/Transforms/Utils/Local.cpp
  test/Transforms/Inline/alloca-dbgdeclare-merge.ll
  test/Transforms/Inline/inline_dbg_declare.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13230.35920.patch
Type: text/x-patch
Size: 8065 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150928/7ed42014/attachment.bin>


More information about the llvm-commits mailing list