class MachineMove;
class RegScavenger;
template<class T> class SmallVectorImpl;
+class raw_ostream;
/// TargetRegisterDesc - This record contains all of the information known about
/// a particular register. The AliasSet field (if not null) contains a pointer
return Reg >= FirstVirtualRegister;
}
+ /// printReg - Print a virtual or physical register on OS.
+ void printReg(unsigned Reg, raw_ostream &OS) const;
+
/// getMinimalPhysRegClass - Returns the Register Class of a physical
/// register of the given type, picking the most sub register class of
/// the right type that contains this physreg.
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/ADT/BitVector.h"
+#include "llvm/Support/raw_ostream.h"
using namespace llvm;
TargetRegisterInfo::~TargetRegisterInfo() {}
+void TargetRegisterInfo::printReg(unsigned Reg, raw_ostream &OS) const {
+ if (Reg && isVirtualRegister(Reg))
+ OS << "%reg" << Reg;
+ else
+ OS << '%' << getName(Reg);
+}
+
/// getMinimalPhysRegClass - Returns the Register Class of a physical
/// register of the given type, picking the most sub register class of
/// the right type that contains this physreg.