Fix for [Bug 16146] gdb.base__call-ar-st.exp fails after pre-RA-sched=source fixes

Guo, Xiaoyi Xiaoyi.Guo at amd.com
Wed May 29 13:14:04 PDT 2013


Attached please find the fix for Bug 16146.

The failure was because CALLSEQ_START and CALLSEQ_END are not ordered. But they are glued with CALL nodes. So the CALL nodes are not scheduled according to IR order.

It was okay before because when DAG builder assigned ordering to nodes, it assigned the current ordering recursively to the current node and all its direct and indirect operands. So the ordering was assigned to even nodes whose DebugLoc was not tracked, such as CALLSEQ_START/CALLSEQ_END, or constants.

I fixed it by passing ordering to getCALLSEQ_START and getCALLSEQ_END. Now the new generated segment looks the same as before.

        .loc    2 1215 0                # ../../../src/gdb/testsuite/gdb.base/cll-ar-st.c:1215:0
        leaq    main.char_array(%rip), %rax
        movq    %rax, %rdi
        movq    %rax, -808(%rbp)        # 8-byte Spill
        callq   print_char_array at PLT
        .loc    2 1216 0                # ../../../src/gdb/testsuite/gdb.base/cll-ar-st.c:1216:0
        leaq    main.double_array(%rip), %rax
        movq    %rax, %rdi
        movq    %rax, -816(%rbp)        # 8-byte Spill
        callq   print_double_array at PLT
        .loc    2 1217 0                # ../../../src/gdb/testsuite/gdb.base/cll-ar-st.c:1217:0
        leaq    main.float_array(%rip), %rax
        movq    %rax, %rdi
        movq    %rax, -824(%rbp)        # 8-byte Spill
        callq   print_float_array at PLT

Thanks,
Xiaoyi

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130529/9f2fcdb7/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PR16146.diff
Type: application/octet-stream
Size: 20666 bytes
Desc: PR16146.diff
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130529/9f2fcdb7/attachment.obj>


More information about the llvm-commits mailing list