[llvm-bugs] [Bug 35015] New: Optimized code debug info: loop induction variable becomes constant
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Oct 20 13:24:53 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=35015
Bug ID: 35015
Summary: Optimized code debug info: loop induction variable
becomes constant
Product: libraries
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: DebugInfo
Assignee: unassignedbugs at nondot.org
Reporter: aprantl at apple.com
CC: llvm-bugs at lists.llvm.org
Here's an example where loop optimizations cause very misleading debug info:
use(int i);
static struct status {
int value;
unsigned char *p;
} status[32];
int init(void)
{
int i;
for (i = 0; i < 32; i++) {
status[i].value = 42;
use(i);
}
}
clang -g -c test.i -o - -Oz | llvm-dwarfdump -name i -
0x0000009f: DW_TAG_variable [11]
DW_AT_location( 0x00000000
0x0000000000000010 - 0x0000000000000032: consts +0,
stack-value )
DW_AT_name( "i" )
DW_AT_type( {0x0000006c} ( int ) )
The output of -print-after-all should give us a hint at which pass(es) are
dropping the llvm.dbg.value. Perhaps this is a use-case for
llvm::salvageDebugInfo().
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20171020/81ec4c00/attachment.html>
More information about the llvm-bugs
mailing list