forked from OSchip/llvm-project
Instead of using isDummyPhiInstr, we just compare the opcode with V9::PHI.
Also, squash a use of TargetInstrInfo::isNop(). llvm-svn: 15905
This commit is contained in:
parent
1ea6d207ce
commit
de44bc018a
|
@ -19,6 +19,7 @@
|
||||||
#include "llvm/Target/TargetMachine.h"
|
#include "llvm/Target/TargetMachine.h"
|
||||||
#include "../../Target/SparcV9/MachineCodeForInstruction.h"
|
#include "../../Target/SparcV9/MachineCodeForInstruction.h"
|
||||||
#include "../../Target/SparcV9/LiveVar/FunctionLiveVarInfo.h"
|
#include "../../Target/SparcV9/LiveVar/FunctionLiveVarInfo.h"
|
||||||
|
#include "../../Target/SparcV9/SparcV9InstrInfo.h"
|
||||||
#include "Support/CommandLine.h"
|
#include "Support/CommandLine.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
@ -633,8 +634,7 @@ RecordSchedule(MachineBasicBlock &MBB, const SchedulingManager& S)
|
||||||
// some NOPs from delay slots. Also, PHIs are not included in the schedule.
|
// some NOPs from delay slots. Also, PHIs are not included in the schedule.
|
||||||
unsigned numInstr = 0;
|
unsigned numInstr = 0;
|
||||||
for (MachineBasicBlock::iterator I=MBB.begin(); I != MBB.end(); ++I)
|
for (MachineBasicBlock::iterator I=MBB.begin(); I != MBB.end(); ++I)
|
||||||
if (! mii.isNop(I->getOpcode()) &&
|
if (!(I->getOpcode() == V9::NOP || I->getOpcode() == V9::PHI))
|
||||||
! mii.isDummyPhiInstr(I->getOpcode()))
|
|
||||||
++numInstr;
|
++numInstr;
|
||||||
assert(S.isched.getNumInstructions() >= numInstr &&
|
assert(S.isched.getNumInstructions() >= numInstr &&
|
||||||
"Lost some non-NOP instructions during scheduling!");
|
"Lost some non-NOP instructions during scheduling!");
|
||||||
|
@ -645,7 +645,7 @@ RecordSchedule(MachineBasicBlock &MBB, const SchedulingManager& S)
|
||||||
// First find the dummy instructions at the start of the basic block
|
// First find the dummy instructions at the start of the basic block
|
||||||
MachineBasicBlock::iterator I = MBB.begin();
|
MachineBasicBlock::iterator I = MBB.begin();
|
||||||
for ( ; I != MBB.end(); ++I)
|
for ( ; I != MBB.end(); ++I)
|
||||||
if (! mii.isDummyPhiInstr(I->getOpcode()))
|
if (I->getOpcode() != V9::PHI)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// Remove all except the dummy PHI instructions from MBB, and
|
// Remove all except the dummy PHI instructions from MBB, and
|
||||||
|
|
Loading…
Reference in New Issue