summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorMatthias Braun <matze@braunis.de>2014-11-19 19:46:11 +0000
committerMatthias Braun <matze@braunis.de>2014-11-19 19:46:11 +0000
commit9f87d75060ff3110537d123556eb2abb9151b7e4 (patch)
tree18a7346b1874b7a8d7aad514c39d41a25e5659e1 /llvm/lib/CodeGen
parentad75510453c7e7dbfb85b4b13520e33e8865b9c0 (diff)
downloadbcm5719-llvm-9f87d75060ff3110537d123556eb2abb9151b7e4.tar.gz
bcm5719-llvm-9f87d75060ff3110537d123556eb2abb9151b7e4.zip
Introduce register dump helper
llvm-svn: 222379
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/TargetRegisterInfo.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/TargetRegisterInfo.cpp b/llvm/lib/CodeGen/TargetRegisterInfo.cpp
index a99f94c248d..61a66b62392 100644
--- a/llvm/lib/CodeGen/TargetRegisterInfo.cpp
+++ b/llvm/lib/CodeGen/TargetRegisterInfo.cpp
@@ -16,6 +16,7 @@
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/VirtRegMap.h"
+#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
using namespace llvm;
@@ -293,3 +294,11 @@ TargetRegisterInfo::getRegAllocationHints(unsigned VirtReg,
// All clear, tell the register allocator to prefer this register.
Hints.push_back(Phys);
}
+
+#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
+void
+TargetRegisterInfo::dumpReg(unsigned Reg, unsigned SubRegIndex,
+ const TargetRegisterInfo *TRI) {
+ dbgs() << PrintReg(Reg, TRI, SubRegIndex) << "\n";
+}
+#endif
OpenPOWER on IntegriCloud