Print basic block boundaries in machine instruction debug output.

llvm-svn: 11704
This commit is contained in:
Alkis Evlogimenos 2004-02-22 05:46:04 +00:00
parent 132f6bb60f
commit cb352300c9
2 changed files with 8 additions and 4 deletions

View File

@ -171,10 +171,13 @@ bool LiveIntervals::runOnMachineFunction(MachineFunction &fn) {
std::ostream_iterator<Interval>(std::cerr, "\n"))); std::ostream_iterator<Interval>(std::cerr, "\n")));
DEBUG(std::cerr << "********** MACHINEINSTRS **********\n"); DEBUG(std::cerr << "********** MACHINEINSTRS **********\n");
DEBUG( DEBUG(
for (unsigned i = 0; i != i2miMap_.size(); ++i) { for (MachineFunction::iterator mbbi = mf_->begin(), mbbe = mf_->end();
if (const MachineInstr* mi = i2miMap_[i]) { mbbi != mbbe; ++mbbi) {
std:: cerr << i * InstrSlots::NUM << '\t'; std::cerr << mbbi->getBasicBlock()->getName() << ":\n";
mi->print(std::cerr, *tm_); for (MachineBasicBlock::iterator mii = mbbi->begin(),
mie = mbbi->end(); mii != mie; ++mii) {
std::cerr << getInstructionIndex(mii) << '\t';
mii->print(std::cerr, *tm_);
} }
}); });

View File

@ -360,6 +360,7 @@ bool RA::runOnMachineFunction(MachineFunction &fn) {
DEBUG( DEBUG(
for (MachineFunction::iterator mbbi = mf_->begin(), mbbe = mf_->end(); for (MachineFunction::iterator mbbi = mf_->begin(), mbbe = mf_->end();
mbbi != mbbe; ++mbbi) { mbbi != mbbe; ++mbbi) {
std::cerr << mbbi->getBasicBlock()->getName() << ":\n";
for (MachineBasicBlock::iterator mii = mbbi->begin(), for (MachineBasicBlock::iterator mii = mbbi->begin(),
mie = mbbi->end(); mii != mie; ++mii) { mie = mbbi->end(); mii != mie; ++mii) {
unsigned index = li_->getInstructionIndex(mii); unsigned index = li_->getInstructionIndex(mii);