]> granicus.if.org Git - llvm/commit
[InstCombine] Add a flag to disable LowerDbgDeclare
authorReid Kleckner <rnk@google.com>
Wed, 13 Sep 2017 01:43:25 +0000 (01:43 +0000)
committerReid Kleckner <rnk@google.com>
Wed, 13 Sep 2017 01:43:25 +0000 (01:43 +0000)
commit5b3b7ed35de875b442a03c006004c411193b4c2d
treeb34374de9e6021e898f3fea0f39e088cfa856c8c
parentb684580f2e7e560928da459153e3a135efe3a6ca
[InstCombine] Add a flag to disable LowerDbgDeclare

Summary:
This should improve optimized debug info for address-taken variables at
the cost of inaccurate debug info in some situations.

We patched this into clang and deployed this change to Chromium
developers, and this significantly improved debuggability of optimized
code. The long-term solution to PR34136 seems more and more like it's
going to take a while, so I would like to commit this change under a
flag so that it can be used as a stop-gap measure.

This flag should really help so for C++ aggregates like std::string and
std::vector, which are typically address-taken, even after inlining, and
cannot be SROA-ed.

Reviewers: aprantl, dblaikie, probinson, dberlin

Subscribers: hiraditya, llvm-commits

Differential Revision: https://reviews.llvm.org/D36596

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313108 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/InstCombine/InstructionCombining.cpp
test/Transforms/InstCombine/debuginfo-skip.ll
test/Transforms/InstCombine/debuginfo.ll
test/Transforms/Util/simplify-dbg-declare-load.ll