diff options
| author | Andrew Trick <atrick@apple.com> | 2013-08-23 17:48:53 +0000 |
|---|---|---|
| committer | Andrew Trick <atrick@apple.com> | 2013-08-23 17:48:53 +0000 |
| commit | 475a9911ca98a822e74ce1546b8aac5df6308bca (patch) | |
| tree | 4fd7917e465453322c04a0a9050eb7f23e49a1df /llvm/lib | |
| parent | e4c1ba762d49969c3cf858879da8ee44e86384f3 (diff) | |
| download | bcm5719-llvm-475a9911ca98a822e74ce1546b8aac5df6308bca.tar.gz bcm5719-llvm-475a9911ca98a822e74ce1546b8aac5df6308bca.zip | |
PrintVRegOrUnit
llvm-svn: 189124
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/CodeGen/TargetRegisterInfo.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/TargetRegisterInfo.cpp b/llvm/lib/CodeGen/TargetRegisterInfo.cpp index ffcee1f51dd..5a1524364b6 100644 --- a/llvm/lib/CodeGen/TargetRegisterInfo.cpp +++ b/llvm/lib/CodeGen/TargetRegisterInfo.cpp @@ -73,6 +73,14 @@ void PrintRegUnit::print(raw_ostream &OS) const { OS << '~' << TRI->getName(*Roots); } +void PrintVRegOrUnit::print(raw_ostream &OS) const { + if (TRI && TRI->isVirtualRegister(Unit)) { + OS << "%vreg" << TargetRegisterInfo::virtReg2Index(Unit); + return; + } + PrintRegUnit::print(OS); +} + /// getAllocatableClass - Return the maximal subclass of the given register /// class that is alloctable, or NULL. const TargetRegisterClass * |

