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)
commit5b477be72a4eafe4ddd927589b8b4d962d379a3f
treed503e60360c8ccdb6aae06e448269ce6c04bf2d8
parentffb5014d9e0b4d7cce24a711480dced5498e0552
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

llvm-svn: 327092
llvm/lib/Transforms/Utils/Local.cpp
llvm/test/DebugInfo/Generic/volatile-alloca.ll [new file with mode: 0644]
llvm/test/Transforms/Util/simplify-dbg-declare-load.ll