[LLVMbugs] [Bug 9907] New: LLVM drops line number information for variables that have debug information attached to PHI nodes

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu May 12 13:25:19 PDT 2011


http://llvm.org/bugs/show_bug.cgi?id=9907

           Summary: LLVM drops line number information for variables that
                    have debug information attached to PHI nodes
           Product: libraries
           Version: 2.7
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Common Code Generator Code
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: micah.villmow at amd.com
                CC: llvmbugs at cs.uiuc.edu


Created an attachment (id=6584)
 --> (http://llvm.org/bugs/attachment.cgi?id=6584)
optimized bitcode that loosed debug information

This bug requires the patch from bug9879 to be applied to see the variables
exist in the debug_info section.

This is what is produce with llc --march=x86 <file>:
___OpenCL_nbt01_kernel:
Lfunc_begin0:
    .loc    1 2 0
    pushl    %ebx
Ltmp0:
    pushl    %edi
Ltmp1:
    pushl    %esi
Ltmp2:
Ltmp3:
    calll    ___amdil_get_local_id_int
    movd    %xmm0, %esi
    movl    16(%esp), %edi
    calll    ___amdil_get_global_id_int
    movd    %xmm0, %ebx
    calll    ___amdil_get_local_size_int
    movd    %xmm0, %eax
Ltmp4:
    .loc    1 9 26
    addl    %ebx, %esi
Ltmp5:
    addl    %eax, %esi
    movl    %esi, (%edi)
Ltmp6:
    .loc    1 10 1
    popl    %esi
    popl    %edi
Ltmp7:
    popl    %ebx
Ltmp8:
    ret
Ltmp9:
Lfunc_end0:

This is what is expected:
___OpenCL_nbt01_kernel:
Lfunc_begin0:
    .loc    1 2 0
    pushl    %ebx
Ltmp0:
    pushl    %edi
Ltmp1:
    pushl    %esi
Ltmp2:
Ltmp3:
    calll    ___amdil_get_local_id_int
    movd    %xmm0, %esi
Ltmp4:
        .loc    1 5 26
    movl    16(%esp), %edi
    calll    ___amdil_get_global_id_int
    movd    %xmm0, %ebx
Ltmp5:
        .loc    1 6 27
    calll    ___amdil_get_local_size_int
    movd    %xmm0, %eax
Ltmp6:
        .loc    1 7 28
Ltmp7:
    .loc    1 9 26
    addl    %ebx, %esi
Ltmp8:
    addl    %eax, %esi
    movl    %esi, (%edi)
Ltmp9:
    .loc    1 10 1
    popl    %esi
    popl    %edi
Ltmp10:
    popl    %ebx
Ltmp11:
    ret
Ltmp12:
Lfunc_end0:

-- 
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