+ for (auto Reg : Clobbers) {
+ // Skip dead defs. They shouldn't be added to the set.
+ if (Reg.second->isReg() && Reg.second->isDead())
+ continue;
+ addReg(Reg.first);
+ }
+}
+
+/// Prin the currently live registers to OS.
+void LivePhysRegs::print(raw_ostream &OS) const {
+ OS << "Live Registers:";
+ if (!TRI) {
+ OS << " (uninitialized)\n";
+ return;
+ }
+
+ if (empty()) {
+ OS << " (empty)\n";
+ return;
+ }
+
+ for (const_iterator I = begin(), E = end(); I != E; ++I)
+ OS << " " << PrintReg(*I, TRI);
+ OS << "\n";
+}
+
+/// Dumps the currently live registers to the debug output.
+void LivePhysRegs::dump() const {
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
+ dbgs() << " " << *this;
+#endif