[llvm] r265475 - [RegisterBankInfo] Add debug print to check how the initialization is going.
Quentin Colombet via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 5 14:48:00 PDT 2016
Author: qcolombet
Date: Tue Apr 5 16:47:56 2016
New Revision: 265475
URL: http://llvm.org/viewvc/llvm-project?rev=265475&view=rev
Log:
[RegisterBankInfo] Add debug print to check how the initialization is going.
Modified:
llvm/trunk/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp
Modified: llvm/trunk/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp?rev=265475&r1=265474&r2=265475&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp (original)
+++ llvm/trunk/lib/CodeGen/GlobalISel/RegisterBankInfo.cpp Tue Apr 5 16:47:56 2016
@@ -13,6 +13,7 @@
#include "llvm/CodeGen/GlobalISel/RegisterBank.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/CodeGen/GlobalISel/RegisterBankInfo.h"
+#include "llvm/Support/Debug.h"
#include "llvm/Target/TargetRegisterInfo.h"
#include <algorithm> // For std::max.
@@ -33,11 +34,14 @@ void RegisterBankInfo::verify(const Targ
const RegisterBank &RegBank = getRegBank(Idx);
assert(Idx == RegBank.getID() &&
"ID does not match the index in the array");
+ DEBUG(dbgs() << "Verify " << RegBank << '\n');
RegBank.verify(TRI);
}
}
void RegisterBankInfo::createRegisterBank(unsigned ID, const char *Name) {
+ DEBUG(dbgs() << "Create register bank: " << ID << " with name \"" << Name
+ << "\"\n");
RegisterBank &RegBank = getRegBank(ID);
assert(RegBank.getID() == RegisterBank::InvalidID &&
"A register bank should be created only once");
@@ -50,6 +54,9 @@ void RegisterBankInfo::addRegBankCoverag
const TargetRegisterInfo &TRI) {
RegisterBank &RB = getRegBank(ID);
unsigned NbOfRegClasses = TRI.getNumRegClasses();
+
+ DEBUG(dbgs() << "Add coverage for: " << RB << '\n');
+
// Check if RB is underconstruction.
if (!RB.isValid())
RB.ContainedRegClasses.resize(NbOfRegClasses);
@@ -69,6 +76,10 @@ void RegisterBankInfo::addRegBankCoverag
unsigned RCId = WorkList.pop_back_val();
const TargetRegisterClass &CurRC = *TRI.getRegClass(RCId);
+
+ DEBUG(dbgs() << "Examine: " << TRI.getRegClassName(&CurRC)
+ << "(Size*8: " << (CurRC.getSize() * 8) << ")\n");
+
// Remember the biggest size in bits.
MaxSize = std::max(MaxSize, CurRC.getSize() * 8);
More information about the llvm-commits
mailing list