[llvm-bugs] [Bug 40638] First DBG_VALUE for parameter is moved down after the end of the prologue (before DebugHandlerBase)

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Jun 7 04:07:16 PDT 2019


https://bugs.llvm.org/show_bug.cgi?id=40638

David Stenberg <david.stenberg at ericsson.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #8 from David Stenberg <david.stenberg at ericsson.com> ---
I never reached the finish line with this. Sorry about that.

In https://reviews.llvm.org/D62650 (r362750), Alexey Lapshin disabled the
lexical-scope trimming which caused the debug value to be moved down. The
trimming was disabled for all types of variables.

If I now compile the attached test case using:

$ clang --target=i386-unknown-linux-gnu -g -O1 pr40638.c -S -mllvm
-stop-after=virtregrewriter -o -

the debug value is kept at the start of the function:

body:             |
  bb.0.entry:
    DBG_VALUE %fixed-stack.0, 0, !19, !DIExpression(), debug-location !20
    renamable $eax = MOV32rm %fixed-stack.0, 1, $noreg, 0, $noreg :: (load 4
from %fixed-stack.0, align 16)
    renamable $ecx = MOV32rm $noreg, 1, $noreg, @g2, $noreg, debug-location !21
:: (dereferenceable load 4 from @g2, !tbaa !22)
    MOV32mr $noreg, 1, $noreg, @g1, $noreg, killed renamable $ecx,
debug-location !26 :: (store 4 into @g1, !tbaa !22)
    MOV32mi killed renamable $eax, 1, $noreg, 0, $noreg, 0, debug-location !27
:: (store 4 into %ir.p1, !tbaa !22)
    RET 0, debug-location !28

I don't think there is anything more to do here, so I'll close this ticket now.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190607/42d73411/attachment-0001.html>


More information about the llvm-bugs mailing list