llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

DeadArgElim does not generate debug info for insertval/extractval instrs

Open djtodoro opened this issue 6 years ago • 1 comments

Bugzilla Link 46350
Resolution FIXED
Resolved on Mar 18, 2021 10:47
Version trunk
OS Linux
CC @dwblaikie,@JDevlieghere,@walkerkd,@pogo59

Extended Description

NOTE: This is found by the LLVM DI Checker utility (https://github.com/djolertrk/llvm-di-checker). I am preparing an RFC, so this will be used as a reference in the proposal.

Basically, an example as:

define internal { i32 } @​fn1() !dbg !​4 { entry: unreachable }

define void @​fn2() personality i32 (i32)* undef !dbg !​8 { entry: %tmp2 = invoke { i32 } @​fn1() to label %bb3 unwind label %bb4, !dbg !​15 bb3: %tmp3 = phi { i32 } [ %tmp2, %entry ], !dbg !​15 unreachable bb4: %tmp4 = landingpad { i8*, i32 } cleanup, !dbg !​15 unreachable }

will end up (after $ opt -deadargelim -S) having the 'insertvalue' with no debug location attached after the DeadArgElim pass.

Proposed fix: https://reviews.llvm.org/D81939

djtodoro avatar Jun 16 '20 14:06 djtodoro

Fixed with the rG1af8c93bab4b.

djtodoro avatar Mar 18 '21 17:03 djtodoro