The physical register + virtual register joining requirement was much too strict.
authorEvan Cheng <evan.cheng@apple.com>
Thu, 20 Dec 2007 02:23:25 +0000 (02:23 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Thu, 20 Dec 2007 02:23:25 +0000 (02:23 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45253 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/SimpleRegisterCoalescing.cpp

index c608b8d1c4aa5627b3f35f05b856a220ea3812b5..c03933944f8d376ace0c06393f7281541d0fb8c5 100644 (file)
@@ -396,7 +396,7 @@ bool SimpleRegisterCoalescing::JoinCopy(CopyRec TheCopy, bool &Again) {
     unsigned JoinVReg = SrcIsPhys ? repDstReg : repSrcReg;
     unsigned JoinPReg = SrcIsPhys ? repSrcReg : repDstReg;
     const TargetRegisterClass *RC = mf_->getSSARegMap()->getRegClass(JoinVReg);
-    unsigned Threshold = allocatableRCRegs_[RC].count();
+    unsigned Threshold = allocatableRCRegs_[RC].count() * 2;
     if (TheCopy.isBackEdge)
       Threshold *= 2; // Favors back edge copies.