[LLVMbugs] [Bug 10125] New: debug variables incorrectly deleted by LLVM in the Live Debug Variables pass
    bugzilla-daemon at llvm.org 
    bugzilla-daemon at llvm.org
       
    Sun Jun 12 00:33:27 PDT 2011
    
    
  
http://llvm.org/bugs/show_bug.cgi?id=10125
           Summary: debug variables incorrectly deleted by LLVM in the
                    Live Debug Variables pass
           Product: libraries
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Common Code Generator Code
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: yousef.shajrawi at amd.com
                CC: llvmbugs at cs.uiuc.edu
Created an attachment (id=6728)
 --> (http://llvm.org/bugs/attachment.cgi?id=6728)
simple OpenCL kernel exibiting this bug
There is a problem with handling DEBUG_VALUE in the method
LDVImpl::collectDebugValues in the Live Debug Variables pass.
The 7th basic block in the kernel vecMul had the DEBUG_VALUE as the first line
in the basic block. Attached to vreg9 which is first defined in this basic
block (1st instruction).
handleDebugValue() returned true and the debug value was erased from the basic
block. In later passes vreg9 is replaced with vreg31 (simple register
coalescing) and later on vreg31 is removed all together (register allocation)
thus removing line #7 from the basic block.
A change is needed for the method LDVImpl::collectDebugValues to handle
DBG_VALUE that has no slot index / use the previous instruction instead &
Handle consecutive DBG_VALUE instructions with the same slot index as follows:
  • In case the target/register operand of the DBG_VALUE is a live in of the
basic block (as it is the regular usual case, for example in the prolog BB and
the variables passed to the kernel)
    o work as usual / previous behavior..
  • Else (the bug described above)
    o Do not erase the DEBUG_VALUE instruction from the basic block
-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
    
    
More information about the llvm-bugs
mailing list