[llvm-commits] patch for Bug #10125

Shajrawi, Yousef Yousef.Shajrawi at amd.com
Mon Jun 13 00:18:45 PDT 2011


Hi Jackob,

Thanks for the helpful reply. The bug I encountered caused the DBG_VALUE instructions not to be written back with references to the correct registers/spills... (unless I kept the DBG_VALUE for the corner-case I described in the bug)

What happened in when reading the DWARF I couldn't see that variable associated with its register, a dump of the output assembly/sections/..etc showed that the variable is not in the ".section                .debug_info".

I found the problem on AMD's OpenCL Compiler (http://llvm.org/devmtg/2010-11/Villmow-OpenCL.pdf ) on the AMDIL Codegen backend (slide 3), Unfortunately I wasn't able to reproduce it with other backbends (x86) that have much less physical registers/more spills.

Regards,
---Yousef


From: Jakob Stoklund Olesen [mailto:stoklund at 2pi.dk]
Sent: Sunday, June 12, 2011 8:45 PM
To: Shajrawi, Yousef
Cc: llvm-commits at cs.uiuc.edu; Villmow, Micah
Subject: Re: [llvm-commits] patch for Bug #10125


On Jun 12, 2011, at 12:50 AM, Shajrawi, Yousef wrote:


I've reported bug #10125 about debug variables incorrectly deleted by LLVM in the Live Debug Variables pass: http://llvm.org/bugs/show_bug.cgi?id=10125

Attached is a patch resolving this bug via adding a check to live ins of a basic block (description is in bugzilla)

Hi Yousef,

I think you are misunderstanding the purpose of the Live Debug Variables pass. It is supposed to remove all DBG_VALUE instructions. It builds a data structure that is easier to work with for the register allocator passes.

After register allocation, the DBG_VALUE instructions are written back with references to the correct physical registers and spill slots.

This is all necessary to keep track of debug variables while the register allocator coalesces and splits and spills live ranges.


 Please see if this is suitable for adding to LLVM and/or please advise on what to do next, This is my first contribution to LLVM so I don't know the procedure...

You are on the right track, but please make sure that you describe the actual symptoms when you file a bug report. The behavior you describe sounds correct to me, and when I run your IR through the ARM backend, the result looks fine.

So what caused you to file a bug in the first place?

/jakob

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110613/8b91fc65/attachment.html>


More information about the llvm-commits mailing list