diff options
| author | Simon Pilgrim <llvm-dev@redking.me.uk> | 2018-09-19 18:59:08 +0000 | 
|---|---|---|
| committer | Simon Pilgrim <llvm-dev@redking.me.uk> | 2018-09-19 18:59:08 +0000 | 
| commit | 2d0f20cc043458c945e4959c5b130c07a7f5b8b5 (patch) | |
| tree | 4c6c2685582012433738444bea2cce36c82c7b04 /llvm/test/DebugInfo | |
| parent | 894c39f770298e8972d3518c9b3531b59c819f56 (diff) | |
| download | bcm5719-llvm-2d0f20cc043458c945e4959c5b130c07a7f5b8b5.tar.gz bcm5719-llvm-2d0f20cc043458c945e4959c5b130c07a7f5b8b5.zip  | |
[X86] Handle COPYs of physregs better (regalloc hints)
Enable enableMultipleCopyHints() on X86.
Original Patch by @jonpa:
While enabling the mischeduler for SystemZ, it was discovered that for some reason a test needed one extra seemingly needless COPY (test/CodeGen/SystemZ/call-03.ll). The handling for that is resulted in this patch, which improves the register coalescing by providing not just one copy hint, but a sorted list of copy hints. On SystemZ, this gives ~12500 less register moves on SPEC, as well as marginally less spilling.
Instead of improving just the SystemZ backend, the improvement has been implemented in common-code (calculateSpillWeightAndHint(). This gives a lot of test failures, but since this should be a general improvement I hope that the involved targets will help and review the test updates.
Differential Revision: https://reviews.llvm.org/D38128
llvm-svn: 342578
Diffstat (limited to 'llvm/test/DebugInfo')
| -rw-r--r-- | llvm/test/DebugInfo/COFF/pieces.ll | 16 | ||||
| -rw-r--r-- | llvm/test/DebugInfo/X86/live-debug-values.ll | 2 | ||||
| -rw-r--r-- | llvm/test/DebugInfo/X86/live-debug-variables.ll | 2 | ||||
| -rw-r--r-- | llvm/test/DebugInfo/X86/pieces-3.ll | 7 | 
4 files changed, 14 insertions, 13 deletions
diff --git a/llvm/test/DebugInfo/COFF/pieces.ll b/llvm/test/DebugInfo/COFF/pieces.ll index 64f32252b53..ab3794dd0b7 100644 --- a/llvm/test/DebugInfo/COFF/pieces.ll +++ b/llvm/test/DebugInfo/COFF/pieces.ll @@ -65,15 +65,15 @@  ; ASM-LABEL: pad_right: # @pad_right -; ASM:         #DEBUG_VALUE: pad_right:o <- [DW_OP_LLVM_fragment 32 32] $ecx -; ASM:         movl    %ecx, %eax +; ASM:         movq    %rcx, %rax +; ASM:         #DEBUG_VALUE: pad_right:o <- [DW_OP_LLVM_fragment 32 32] $eax  ; ASM:         retq  ; ASM-LABEL: pad_left: # @pad_left -; ASM:         #DEBUG_VALUE: pad_left:o <- [DW_OP_LLVM_fragment 0 32] $ecx  ; ASM:         .cv_loc 2 1 24 3                # t.c:24:3 -; ASM:         movl    %ecx, %eax +; ASM:         movq    %rcx, %rax +; ASM:         #DEBUG_VALUE: pad_left:o <- [DW_OP_LLVM_fragment 0 32] $eax  ; ASM:         retq @@ -136,7 +136,7 @@  ; ASM:        .asciz  "pad_right"             # Function name  ; ASM:        .short  4414                    # Record kind: S_LOCAL  ; ASM:        .asciz  "o" -; ASM:        .cv_def_range    .Lfunc_begin1 .Lfunc_end1, "C\021\022\000\000\000\004\000\000\000" +; ASM:        .cv_def_range    .Lfunc_begin1 .Ltmp8, "C\021\021\000\000\000\004\000\000\000"  ; OBJ-LABEL: {{.*}}Proc{{.*}}Sym {  ; OBJ:         Kind: S_GPROC32_ID (0x1147) @@ -146,7 +146,7 @@  ; OBJ:         VarName: o  ; OBJ:       }  ; OBJ:       DefRangeSubfieldRegisterSym { -; OBJ:         Register: ECX (0x12) +; OBJ:         Register: EAX (0x11)  ; OBJ:         MayHaveNoName: 0  ; OBJ:         OffsetInParent: 4  ; OBJ:         LocalVariableAddrRange { @@ -159,7 +159,7 @@  ; ASM:        .asciz  "pad_left"              # Function name  ; ASM:        .short  4414                    # Record kind: S_LOCAL  ; ASM:        .asciz  "o" -; ASM:        .cv_def_range    .Lfunc_begin2 .Lfunc_end2, "C\021\022\000\000\000\000\000\000\000" +; ASM:        .cv_def_range    .Lfunc_begin2 .Ltmp10, "C\021\021\000\000\000\000\000\000\000"  ; OBJ-LABEL: {{.*}}Proc{{.*}}Sym {  ; OBJ:         Kind: S_GPROC32_ID (0x1147) @@ -169,7 +169,7 @@  ; OBJ:         VarName: o  ; OBJ:       }  ; OBJ:       DefRangeSubfieldRegisterSym { -; OBJ:         Register: ECX (0x12) +; OBJ:         Register: EAX (0x11)  ; OBJ:         MayHaveNoName: 0  ; OBJ:         OffsetInParent: 0  ; OBJ:         LocalVariableAddrRange { diff --git a/llvm/test/DebugInfo/X86/live-debug-values.ll b/llvm/test/DebugInfo/X86/live-debug-values.ll index 9bf2d3ef91a..4884733af3c 100644 --- a/llvm/test/DebugInfo/X86/live-debug-values.ll +++ b/llvm/test/DebugInfo/X86/live-debug-values.ll @@ -33,7 +33,7 @@  ; CHECK-NEXT:  #DEBUG_VALUE: main:n <- $ebx  ;   Other register values have been clobbered.  ; CHECK-NOT:   #DEBUG_VALUE: -; CHECK:         movl    %ecx, m(%rip) +; CHECK:         movl    %esi, m(%rip)  ; ModuleID = 'LiveDebugValues.c'  source_filename = "test/DebugInfo/X86/live-debug-values.ll" diff --git a/llvm/test/DebugInfo/X86/live-debug-variables.ll b/llvm/test/DebugInfo/X86/live-debug-variables.ll index 5f510e86a84..e746a0d5718 100644 --- a/llvm/test/DebugInfo/X86/live-debug-variables.ll +++ b/llvm/test/DebugInfo/X86/live-debug-variables.ll @@ -25,7 +25,7 @@  ; CHECK:      .debug_loc contents:  ; CHECK-NEXT: 0x00000000:  ;   We currently emit an entry for the function prologue, too, which could be optimized away. -; CHECK:              [0x000000000000001f, 0x000000000000003c): DW_OP_reg3 RBX +; CHECK:              [0x0000000000000018, 0x0000000000000072): DW_OP_reg3 RBX  ;   We should only have one entry inside the function.  ; CHECK-NOT: : diff --git a/llvm/test/DebugInfo/X86/pieces-3.ll b/llvm/test/DebugInfo/X86/pieces-3.ll index 8afdcfac60f..e67e51e292b 100644 --- a/llvm/test/DebugInfo/X86/pieces-3.ll +++ b/llvm/test/DebugInfo/X86/pieces-3.ll @@ -17,11 +17,12 @@  ;  ; CHECK: DW_TAG_formal_parameter [3]  ; CHECK-NEXT:   DW_AT_location [DW_FORM_data4]        ( -; CHECK-NEXT:     [0x0000000000000000, 0x0000000000000004): DW_OP_reg5 RDI, DW_OP_piece 0x8, DW_OP_piece 0x4, DW_OP_reg4 RSI, DW_OP_piece 0x4 -; CHECK-NEXT:     [0x0000000000000004, 0x0000000000000008): DW_OP_reg5 RDI, DW_OP_piece 0x8, DW_OP_piece 0x4, DW_OP_reg4 RSI, DW_OP_piece 0x4) +; CHECK-NEXT:     [0x0000000000000000, 0x0000000000000007): DW_OP_reg5 RDI, DW_OP_piece 0x8, DW_OP_piece 0x4, DW_OP_reg4 RSI, DW_OP_piece 0x4 +; CHECK-NEXT:     [0x0000000000000007, 0x0000000000000007): DW_OP_reg5 RDI, DW_OP_piece 0x8, DW_OP_piece 0x4, DW_OP_reg0 RAX, DW_OP_piece 0x4)  ; CHECK-NEXT:   DW_AT_name {{.*}}"outer"  ; CHECK: DW_TAG_variable -; CHECK-NEXT:   DW_AT_location {{.*}}(DW_OP_reg4 RSI, DW_OP_piece 0x4) +; CHECK-NEXT:   DW_AT_location [DW_FORM_data4]        (0x00000044 +; CHECK-NEXT:     [0x0000000000000007, 0x0000000000000007): DW_OP_reg0 RAX, DW_OP_piece 0x4)  ; CHECK-NEXT:   "i1"  ; ModuleID = '/Volumes/Data/llvm/test/DebugInfo/X86/sroasplit-2.ll'  | 

