Remove the ObjC ARC passes from the default optimization list, and add
[oota-llvm.git] / lib / CodeGen / RegisterClassInfo.h
index e41ae9e8dab4b39f3c754db16a6c6acce45a709b..d21fd67efe8b0271c400397ee0a9ea8409ebc129 100644 (file)
@@ -95,6 +95,25 @@ public:
       return CalleeSaved[N-1];
     return 0;
   }
+
+  /// isReserved - Returns true when PhysReg is a reserved register.
+  ///
+  /// Reserved registers may belong to an allocatable register class, but the
+  /// target has explicitly requested that they are not used.
+  ///
+  bool isReserved(unsigned PhysReg) const {
+    return Reserved.test(PhysReg);
+  }
+
+  /// isAllocatable - Returns true when PhysReg belongs to an allocatable
+  /// register class and it hasn't been reserved.
+  ///
+  /// Allocatable registers may show up in the allocation order of some virtual
+  /// register, so a register allocator needs to track its liveness and
+  /// availability.
+  bool isAllocatable(unsigned PhysReg) const {
+    return TRI->isInAllocatableClass(PhysReg) && !isReserved(PhysReg);
+  }
 };
 } // end namespace llvm