Move common code into an MRI function.
[oota-llvm.git] / lib / CodeGen / ExecutionDepsFix.cpp
index 4ec75cdfec97094ef1075b6e3298ffd5ac6637ab..c057c1bcdc27aef2ab27de9b76d462d9dee752bc 100644 (file)
@@ -654,11 +654,10 @@ bool ExeDepsFix::runOnMachineFunction(MachineFunction &mf) {
   bool anyregs = false;
   for (TargetRegisterClass::const_iterator I = RC->begin(), E = RC->end();
        I != E; ++I)
-    for (const unsigned *AI = TRI->getOverlaps(*I); *AI; ++AI)
-      if (MF->getRegInfo().isPhysRegUsed(*AI)) {
-        anyregs = true;
-        break;
-      }
+    if (MF->getRegInfo().isPhysRegOrOverlapUsed(*I)) {
+      anyregs = true;
+      break;
+    }
   if (!anyregs) return false;
 
   // Initialize the AliasMap on the first use.