mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 12:12:47 +01:00
Ignore DEBUG_VALUE when building live intervals;
this makes the code work transparently the same whether they're there or not. llvm-svn: 94240
This commit is contained in:
parent
576e41a375
commit
b1ebe8137b
@ -140,7 +140,10 @@ void LiveIntervals::printInstrs(raw_ostream &OS) const {
|
|||||||
<< ":\t\t# derived from " << mbbi->getName() << "\n";
|
<< ":\t\t# derived from " << mbbi->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) {
|
||||||
OS << getInstructionIndex(mii) << '\t' << *mii;
|
if (mii->getOpcode()==TargetInstrInfo::DEBUG_VALUE)
|
||||||
|
OS << SlotIndex::getEmptyKey() << '\t' << *mii;
|
||||||
|
else
|
||||||
|
OS << getInstructionIndex(mii) << '\t' << *mii;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -672,8 +675,6 @@ void LiveIntervals::computeIntervals() {
|
|||||||
SlotIndex MIIndex = getMBBStartIdx(MBB);
|
SlotIndex MIIndex = getMBBStartIdx(MBB);
|
||||||
DEBUG(dbgs() << MBB->getName() << ":\n");
|
DEBUG(dbgs() << MBB->getName() << ":\n");
|
||||||
|
|
||||||
MachineBasicBlock::iterator MI = MBB->begin(), miEnd = MBB->end();
|
|
||||||
|
|
||||||
// Create intervals for live-ins to this BB first.
|
// Create intervals for live-ins to this BB first.
|
||||||
for (MachineBasicBlock::const_livein_iterator LI = MBB->livein_begin(),
|
for (MachineBasicBlock::const_livein_iterator LI = MBB->livein_begin(),
|
||||||
LE = MBB->livein_end(); LI != LE; ++LI) {
|
LE = MBB->livein_end(); LI != LE; ++LI) {
|
||||||
@ -689,8 +690,11 @@ void LiveIntervals::computeIntervals() {
|
|||||||
if (getInstructionFromIndex(MIIndex) == 0)
|
if (getInstructionFromIndex(MIIndex) == 0)
|
||||||
MIIndex = indexes_->getNextNonNullIndex(MIIndex);
|
MIIndex = indexes_->getNextNonNullIndex(MIIndex);
|
||||||
|
|
||||||
for (; MI != miEnd; ++MI) {
|
for (MachineBasicBlock::iterator MI = MBB->begin(), miEnd = MBB->end();
|
||||||
|
MI != miEnd; ++MI) {
|
||||||
DEBUG(dbgs() << MIIndex << "\t" << *MI);
|
DEBUG(dbgs() << MIIndex << "\t" << *MI);
|
||||||
|
if (MI->getOpcode()==TargetInstrInfo::DEBUG_VALUE)
|
||||||
|
continue;
|
||||||
|
|
||||||
// Handle defs.
|
// Handle defs.
|
||||||
for (int i = MI->getNumOperands() - 1; i >= 0; --i) {
|
for (int i = MI->getNumOperands() - 1; i >= 0; --i) {
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
#include "llvm/Support/Debug.h"
|
#include "llvm/Support/Debug.h"
|
||||||
#include "llvm/Support/raw_ostream.h"
|
#include "llvm/Support/raw_ostream.h"
|
||||||
#include "llvm/Support/ManagedStatic.h"
|
#include "llvm/Support/ManagedStatic.h"
|
||||||
|
#include "llvm/Target/TargetInstrInfo.h"
|
||||||
|
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
@ -107,6 +108,8 @@ bool SlotIndexes::runOnMachineFunction(MachineFunction &fn) {
|
|||||||
for (MachineBasicBlock::iterator miItr = mbb->begin(), miEnd = mbb->end();
|
for (MachineBasicBlock::iterator miItr = mbb->begin(), miEnd = mbb->end();
|
||||||
miItr != miEnd; ++miItr) {
|
miItr != miEnd; ++miItr) {
|
||||||
MachineInstr *mi = &*miItr;
|
MachineInstr *mi = &*miItr;
|
||||||
|
if (mi->getOpcode()==TargetInstrInfo::DEBUG_VALUE)
|
||||||
|
continue;
|
||||||
|
|
||||||
if (miItr == mbb->getFirstTerminator()) {
|
if (miItr == mbb->getFirstTerminator()) {
|
||||||
push_back(createEntry(0, index));
|
push_back(createEntry(0, index));
|
||||||
|
Loading…
Reference in New Issue
Block a user