Remove the -disable-cross-class-join option.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Wed, 25 Apr 2012 16:17:50 +0000 (16:17 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Wed, 25 Apr 2012 16:17:50 +0000 (16:17 +0000)
Cross-class joins have been normal and fully supported for a while now.
With TableGen generating the getMatchingSuperRegClass() hook, they are
unlikely to cause problems again.

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

lib/CodeGen/RegisterCoalescer.cpp

index a82a5898345374790c30cad55f660bd62ee8a6ae..16b9a7dbd9d2b7c8d559301ccc39d091d0eebe8c 100644 (file)
@@ -62,11 +62,6 @@ EnableJoining("join-liveintervals",
               cl::desc("Coalesce copies (default=true)"),
               cl::init(true));
 
-static cl::opt<bool>
-DisableCrossClassJoin("disable-cross-class-join",
-               cl::desc("Avoid coalescing cross register class copies"),
-               cl::init(false), cl::Hidden);
-
 static cl::opt<bool>
 EnablePhysicalJoin("join-physregs",
                    cl::desc("Join physical register copies"),
@@ -1094,14 +1089,10 @@ bool RegisterCoalescer::JoinCopy(MachineInstr *CopyMI, bool &Again) {
       return false;
     }
   } else {
-    // Avoid constraining virtual register regclass too much.
-    if (CP.isCrossClass()) {
-      DEBUG(dbgs() << "\tCross-class to " << CP.getNewRC()->getName() << ".\n");
-      if (DisableCrossClassJoin) {
-        DEBUG(dbgs() << "\tCross-class joins disabled.\n");
-        return false;
-      }
-    }
+    DEBUG({
+      if (CP.isCrossClass())
+        dbgs() << "\tCross-class to " << CP.getNewRC()->getName() << ".\n";
+    });
 
     // When possible, let DstReg be the larger interval.
     if (!CP.getSubIdx() && LIS->getInterval(CP.getSrcReg()).ranges.size() >