1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00

Remove schedule-livein-copies. It's not being used.

llvm-svn: 105095
This commit is contained in:
Evan Cheng 2010-05-29 02:23:39 +00:00
parent 96bdf3e6f1
commit fd971f18cb
2 changed files with 12 additions and 31 deletions

View File

@ -174,11 +174,6 @@ unsigned MachineRegisterInfo::getLiveInVirtReg(unsigned PReg) const {
return 0; return 0;
} }
static cl::opt<bool>
SchedLiveInCopies("schedule-livein-copies", cl::Hidden,
cl::desc("Schedule copies of livein registers"),
cl::init(false));
/// EmitLiveInCopy - Emit a copy for a live in physical register. If the /// EmitLiveInCopy - Emit a copy for a live in physical register. If the
/// physical register has only a single copy use, then coalesced the copy /// physical register has only a single copy use, then coalesced the copy
/// if possible. /// if possible.
@ -254,34 +249,21 @@ void
MachineRegisterInfo::EmitLiveInCopies(MachineBasicBlock *EntryMBB, MachineRegisterInfo::EmitLiveInCopies(MachineBasicBlock *EntryMBB,
const TargetRegisterInfo &TRI, const TargetRegisterInfo &TRI,
const TargetInstrInfo &TII) { const TargetInstrInfo &TII) {
if (SchedLiveInCopies) { // Emit the copies into the top of the block.
// Emit the copies at a heuristically-determined location in the block. for (MachineRegisterInfo::livein_iterator LI = livein_begin(),
DenseMap<MachineInstr*, unsigned> CopyRegMap; E = livein_end(); LI != E; ++LI)
MachineBasicBlock::iterator InsertPos = EntryMBB->begin(); if (LI->second) {
for (MachineRegisterInfo::livein_iterator LI = livein_begin(), const TargetRegisterClass *RC = getRegClass(LI->second);
E = livein_end(); LI != E; ++LI) bool Emitted = TII.copyRegToReg(*EntryMBB, EntryMBB->begin(),
if (LI->second) { LI->second, LI->first, RC, RC,
const TargetRegisterClass *RC = getRegClass(LI->second); DebugLoc());
EmitLiveInCopy(EntryMBB, InsertPos, LI->second, LI->first, assert(Emitted && "Unable to issue a live-in copy instruction!\n");
RC, CopyRegMap, *this, TRI, TII); (void) Emitted;
} }
} else {
// Emit the copies into the top of the block.
for (MachineRegisterInfo::livein_iterator LI = livein_begin(),
E = livein_end(); LI != E; ++LI)
if (LI->second) {
const TargetRegisterClass *RC = getRegClass(LI->second);
bool Emitted = TII.copyRegToReg(*EntryMBB, EntryMBB->begin(),
LI->second, LI->first, RC, RC,
DebugLoc());
assert(Emitted && "Unable to issue a live-in copy instruction!\n");
(void) Emitted;
}
}
// Add function live-ins to entry block live-in set. // Add function live-ins to entry block live-in set.
for (MachineRegisterInfo::livein_iterator I = livein_begin(), for (MachineRegisterInfo::livein_iterator I = livein_begin(),
E = livein_end(); I != E; ++I) E = livein_end(); I != E; ++I)
EntryMBB->addLiveIn(I->first); EntryMBB->addLiveIn(I->first);
} }

View File

@ -1,5 +1,4 @@
; RUN: llc < %s -mtriple=i386-pc-linux-gnu -relocation-model=pic -disable-fp-elim ; RUN: llc < %s -mtriple=i386-pc-linux-gnu -relocation-model=pic -disable-fp-elim
; RUN: llc < %s -mtriple=i386-pc-linux-gnu -relocation-model=pic -disable-fp-elim -schedule-livein-copies | not grep {Number of register spills}
; PR2134 ; PR2134
declare fastcc i8* @w_addchar(i8*, i32*, i32*, i8 signext ) nounwind declare fastcc i8* @w_addchar(i8*, i32*, i32*, i8 signext ) nounwind