[PATCH] D45397: [Mem2Reg] Create merged debug locations for inserted phis
Vedant Kumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 6 18:07:30 PDT 2018
vsk created this revision.
vsk added reviewers: dblaikie, aprantl, rnk.
Herald added a subscriber: eraman.
Track the debug locations of the incoming values to newly-created phis,
and apply merged debug locations to the phis.
A merged location will be on line 0, but will have the correct scope
set. This improves crash reporting when an inlined instruction with a
merged location triggers a machine exception. A debugger will be able to
narrow down the crash to the correct inlined scope, instead of simply
pointing to the outer scope of the caller.
Taken together with a change allows generating merged line-0 locations
for instructions which aren't calls, this results in a 0.5% increase in
the uncompressed size of the .debug_line section of a stage2+Release
build of clang (-O3 -g).
Depends on https://reviews.llvm.org/D45396.
rdar://33858697
https://reviews.llvm.org/D45397
Files:
lib/Transforms/Utils/PromoteMemoryToRegister.cpp
test/Transforms/Mem2Reg/dbg-inline-scope-for-phi.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45397.141463.patch
Type: text/x-patch
Size: 10677 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180407/63f656f8/attachment.bin>
More information about the llvm-commits
mailing list