OSDN Git Service

LowerDbgDeclare: ignore dbg.declares for allocas with volatile access
authorAdrian Prantl <aprantl@apple.com>
Fri, 9 Mar 2018 00:45:04 +0000 (00:45 +0000)
committerAdrian Prantl <aprantl@apple.com>
Fri, 9 Mar 2018 00:45:04 +0000 (00:45 +0000)
commitac41ddd33c13464017b115e584c863e65b4e3005
tree119fe505e1c9fa9c47d9db9f8c5e7b5d0cd546de
parentde81a7e98269420aee44b517e49bf69f6c76693e
LowerDbgDeclare: ignore dbg.declares for allocas with volatile access

There is no point in lowering a dbg.declare describing an alloca that
has volatile loads or stores as users, since the alloca cannot be
elided. Lowering the dbg.declare will result in larger debug info that
may also have worse coverage than just describing the alloca.

rdar://problem/34496278

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@327092 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/Local.cpp
test/DebugInfo/Generic/volatile-alloca.ll [new file with mode: 0644]
test/Transforms/Util/simplify-dbg-declare-load.ll