[PATCH] D21911: Do not count debug instructions when counting number of uses to reorder frame objects.
David Majnemer via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 30 18:30:46 PDT 2016
majnemer accepted this revision.
majnemer added a comment.
This revision is now accepted and ready to land.
LGTM with the suggested changes to local-variables.ll undone.
================
Comment at: test/DebugInfo/COFF/local-variables.ll:30-59
@@ -29,32 +29,32 @@
; ASM: subq $56, %rsp
-; ASM: #DEBUG_VALUE: f:param <- [%RSP+44]
-; ASM: movl %ecx, 44(%rsp)
+; ASM: #DEBUG_VALUE: f:param <- [%RSP+[[OFF1:.*]]]
+; ASM: movl %ecx, [[OFF1]](%rsp)
; ASM: [[prologue_end:\.Ltmp.*]]:
; ASM: .cv_loc 0 1 8 7 # t.cpp:8:7
; ASM: testl %ecx, %ecx
; ASM: je .LBB0_2
; ASM: [[if_start:\.Ltmp.*]]:
; ASM: # BB#1: # %if.then
-; ASM: #DEBUG_VALUE: f:param <- [%RSP+44]
+; ASM: #DEBUG_VALUE: f:param <- [%RSP+[[OFF1]]]
; ASM: #DEBUG_VALUE: a <- [%RSP+40]
; ASM: .cv_loc 0 1 9 9 # t.cpp:9:9
; ASM: movl $42, 40(%rsp)
; ASM: [[inline_site1:\.Ltmp.*]]:
; ASM: .cv_loc 1 1 4 7 # t.cpp:4:7
-; ASM: movl $3, 48(%rsp)
-; ASM: leaq 48(%rsp), %rcx
+; ASM: movl $3, [[OFF2:.*]](%rsp)
+; ASM: leaq [[OFF2]](%rsp), %rcx
; ASM: .cv_loc 1 1 5 3 # t.cpp:5:3
; ASM: callq capture
; ASM: leaq 40(%rsp), %rcx
; ASM: jmp .LBB0_3
; ASM: [[else_start:\.Ltmp.*]]:
; ASM: .LBB0_2: # %if.else
-; ASM: #DEBUG_VALUE: f:param <- [%RSP+44]
+; ASM: #DEBUG_VALUE: f:param <- [%RSP+[[OFF1]]]
; ASM: #DEBUG_VALUE: b <- [%RSP+36]
; ASM: .cv_loc 0 1 13 9 # t.cpp:13:9
; ASM: movl $42, 36(%rsp)
; ASM: [[inline_site2:\.Ltmp.*]]:
; ASM: .cv_loc 2 1 4 7 # t.cpp:4:7
-; ASM: movl $3, 52(%rsp)
-; ASM: leaq 52(%rsp), %rcx
+; ASM: movl $3, [[OFF3:.*]](%rsp)
+; ASM: leaq [[OFF3]](%rsp), %rcx
; ASM: .cv_loc 2 1 5 3 # t.cpp:5:3
----------------
danielcdh wrote:
> majnemer wrote:
> > You should use these variables down below
> The tests down below are separate tests (OBJ v.s. ASM), and these variables has no reuse in that test. So do you mean that I do not check these offset values at all in the OBJ tests? I can remove the check for numbers if that is what you meant.
Ah, nevermind. In that case the test is better off with an explicit offset... Sorry about that!
http://reviews.llvm.org/D21911
More information about the llvm-commits
mailing list