Villmow, Micah
2011-Apr-15 00:31 UTC
[LLVMdev] Valid debug information being deleted by DAGCombiner
I am working on some debug problems that we are seeing with the x86 backend and OpenCL. The input is linked.bc. There are three debug values, ip, tid and gid. llc -march=x86 linked.bc -o linked-x86.s <-- assembly file has all three values in the debug info section However, if I attempt to optimize the bitcode with the following command: opt -disable-opt -inline-all -mem2reg linked.bc -o optimized.bc llc -march=x86 optimized.bc -o optimized-x86.s <-- Assembly file only has ip and gid in the debug info section. Any idea on how to get this to work? I've attached the output, which is missing the 'tid' debug variable. Thanks, Micah -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110414/1fb7a359/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: linked.bc Type: application/octet-stream Size: 1720 bytes Desc: linked.bc URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110414/1fb7a359/attachment.obj> -------------- next part -------------- A non-text attachment was scrubbed... Name: optimized.s Type: application/octet-stream Size: 16474 bytes Desc: optimized.s URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110414/1fb7a359/attachment-0001.obj>
Villmow, Micah
2011-Apr-15 01:22 UTC
[LLVMdev] Valid debug information being deleted by DAGCombiner
Found another bitcode file where a debug symbol is being dropped. In the attached bitcode file, the variable gid is not in the debug output. From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Villmow, Micah Sent: Thursday, April 14, 2011 5:31 PM To: llvmdev at cs.uiuc.edu Subject: [LLVMdev] Valid debug information being deleted by DAGCombiner I am working on some debug problems that we are seeing with the x86 backend and OpenCL. The input is linked.bc. There are three debug values, ip, tid and gid. llc -march=x86 linked.bc -o linked-x86.s <-- assembly file has all three values in the debug info section However, if I attempt to optimize the bitcode with the following command: opt -disable-opt -inline-all -mem2reg linked.bc -o optimized.bc llc -march=x86 optimized.bc -o optimized-x86.s <-- Assembly file only has ip and gid in the debug info section. Any idea on how to get this to work? I've attached the output, which is missing the 'tid' debug variable. Thanks, Micah -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110414/6e8e934d/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: x86_optimized.bc Type: application/octet-stream Size: 1408 bytes Desc: x86_optimized.bc URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110414/6e8e934d/attachment.obj>
John Criswell
2011-Apr-15 02:07 UTC
[LLVMdev] Valid debug information being deleted by DAGCombiner
On 4/14/11 8:22 PM, Villmow, Micah wrote:> > Found another bitcode file where a debug symbol is being dropped. > > In the attached bitcode file, the variable gid is not in the debug output. >Dumb question: Have you looked to see if mem2reg is destroying (or not maintaining) the debug information of interest (or put another way, was the variable gid promoted to an LLVM register and therefore had its debug information destroyed)? I haven't used LLVM's new debug facilities, so my knowledge is out of date, but I think optimizations are still permitted to remove debug info. -- John T.> *From:*llvmdev-bounces at cs.uiuc.edu > [mailto:llvmdev-bounces at cs.uiuc.edu] *On Behalf Of *Villmow, Micah > *Sent:* Thursday, April 14, 2011 5:31 PM > *To:* llvmdev at cs.uiuc.edu > *Subject:* [LLVMdev] Valid debug information being deleted by DAGCombiner > > I am working on some debug problems that we are seeing with the x86 > backend and OpenCL. > > The input is linked.bc. There are three debug values, ip, tid and gid. > > llc -march=x86 linked.bc -o linked-x86.s <-- assembly file has all > three values in the debug info section > > However, if I attempt to optimize the bitcode with the following command: > > opt -disable-opt -inline-all -mem2reg linked.bc -o optimized.bc > > llc -march=x86 optimized.bc -o optimized-x86.s <-- Assembly file only > has ip and gid in the debug info section. > > Any idea on how to get this to work? I've attached the output, which > is missing the 'tid' debug variable. > > Thanks, > > Micah > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110414/1e8c4100/attachment.html>
Reasonably Related Threads
- [LLVMdev] Valid debug information being deleted by DAGCombiner
- [LLVMdev] Valid debug information being deleted by DAGCombiner
- [LLVMdev] Valid debug information being deleted by DAGCombiner
- [LLVMdev] Valid debug information being deleted by DAGCombiner
- [LLVMdev] Valid debug information being deleted by DAGCombiner