OSDN Git Service

Reapply coalescer fix for better cross-class coalescing.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Thu, 11 Feb 2010 23:55:29 +0000 (23:55 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Thu, 11 Feb 2010 23:55:29 +0000 (23:55 +0000)
This time with fixed test cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95938 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SimpleRegisterCoalescing.cpp
test/CodeGen/Thumb2/cross-rc-coalescing-2.ll
test/CodeGen/X86/2008-07-11-SpillerBug.ll
test/CodeGen/X86/pr1505b.ll
test/CodeGen/X86/pr3495.ll
test/CodeGen/X86/stack-color-with-reg.ll
test/CodeGen/X86/twoaddr-coalesce.ll

index df5c0ef..ac19f48 100644 (file)
@@ -1148,7 +1148,7 @@ SimpleRegisterCoalescing::isWinToJoinCrossClass(unsigned LargeReg,
   LiveInterval &SmallInt = li_->getInterval(SmallReg);
   unsigned LargeSize = li_->getApproximateInstructionCount(LargeInt);
   unsigned SmallSize = li_->getApproximateInstructionCount(SmallInt);
-  if (SmallSize > Threshold || LargeSize > Threshold) {
+  if (LargeSize > Threshold) {
     unsigned SmallUses = std::distance(mri_->use_nodbg_begin(SmallReg),
                                        mri_->use_nodbg_end());
     unsigned LargeUses = std::distance(mri_->use_nodbg_begin(LargeReg),
index 8f6449e..2b20931 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: llc < %s -mtriple=thumbv7-apple-darwin9 -mcpu=cortex-a8 | grep vmov.f32 | count 7
+; RUN: llc < %s -mtriple=thumbv7-apple-darwin9 -mcpu=cortex-a8 | grep vmov.f32 | count 3
 
 define arm_apcscc void @fht(float* nocapture %fz, i16 signext %n) nounwind {
 entry:
index cd99c0e..548b44d 100644 (file)
@@ -1,9 +1,7 @@
 ; RUN: llc < %s -march=x86 -relocation-model=static -disable-fp-elim -post-RA-scheduler=false -asm-verbose=0 | FileCheck %s
 ; PR2536
 
-
-; CHECK: movw %cx
-; CHECK-NEXT: andl    $65534, %
+; CHECK: andl    $65534, %
 ; CHECK-NEXT: movl %
 ; CHECK-NEXT: movl $17
 
index 12736cd..6a08dae 100644 (file)
@@ -1,5 +1,5 @@
-; RUN: llc < %s -mcpu=i486 | grep fstpl | count 4
-; RUN: llc < %s -mcpu=i486 | grep fstps | count 3
+; RUN: llc < %s -mcpu=i486 | grep fstpl | count 5
+; RUN: llc < %s -mcpu=i486 | grep fstps | count 2
 ; PR1505
 
 target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64"
index 1795970..14f2a54 100644 (file)
@@ -1,6 +1,6 @@
 ; RUN: llc < %s -march=x86 -stats |& grep {Number of loads added} | grep 2
 ; RUN: llc < %s -march=x86 -stats |& grep {Number of register spills} | grep 1
-; RUN: llc < %s -march=x86 -stats |& grep {Number of machine instrs printed} | grep 38
+; RUN: llc < %s -march=x86 -stats |& grep {Number of machine instrs printed} | grep 37
 ; PR3495
 ; The loop reversal kicks in once here, resulting in one fewer instruction.
 
index 7d85818..42e7a39 100644 (file)
@@ -1,5 +1,5 @@
 ; RUN: llc < %s -mtriple=x86_64-apple-darwin10 -relocation-model=pic -disable-fp-elim -color-ss-with-regs -stats -info-output-file - > %t
-; RUN:   grep stackcoloring %t | grep "stack slot refs replaced with reg refs"  | grep 14
+; RUN:   grep stackcoloring %t | grep "stack slot refs replaced with reg refs"  | grep 8
 
        type { [62 x %struct.Bitvec*] }         ; type %0
        type { i8* }            ; type %1
index d0e13f6..4c37225 100644 (file)
@@ -1,4 +1,4 @@
-; RUN: llc < %s -march=x86 | grep mov | count 5
+; RUN: llc < %s -march=x86 | grep mov | count 4
 ; rdar://6523745
 
 @"\01LC" = internal constant [4 x i8] c"%d\0A\00"              ; <[4 x i8]*> [#uses=1]