aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Gaeke <gaeke@uiuc.edu>2004-08-18 20:04:21 +0000
committerBrian Gaeke <gaeke@uiuc.edu>2004-08-18 20:04:21 +0000
commite058b27faf9ba0df1582fddda55c3bcbd96de9a0 (patch)
tree8774211bef2bc46876e10a86a271ffe7f290a556
parenta1e51ff2aa965467632e761774e33ce191f602e7 (diff)
Instead of using isDummyPhiInstr, we just compare the opcode with V9::PHI.
Also, squash a use of TargetInstrInfo::isNop(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15905 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/InstrSched/InstrScheduling.cpp6
-rw-r--r--lib/Target/SparcV9/InstrSched/InstrScheduling.cpp6
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/CodeGen/InstrSched/InstrScheduling.cpp b/lib/CodeGen/InstrSched/InstrScheduling.cpp
index 13b629c1b8..fc4d6a7164 100644
--- a/lib/CodeGen/InstrSched/InstrScheduling.cpp
+++ b/lib/CodeGen/InstrSched/InstrScheduling.cpp
@@ -19,6 +19,7 @@
#include "llvm/Target/TargetMachine.h"
#include "../../Target/SparcV9/MachineCodeForInstruction.h"
#include "../../Target/SparcV9/LiveVar/FunctionLiveVarInfo.h"
+#include "../../Target/SparcV9/SparcV9InstrInfo.h"
#include "Support/CommandLine.h"
#include <algorithm>
#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.
unsigned numInstr = 0;
for (MachineBasicBlock::iterator I=MBB.begin(); I != MBB.end(); ++I)
- if (! mii.isNop(I->getOpcode()) &&
- ! mii.isDummyPhiInstr(I->getOpcode()))
+ if (!(I->getOpcode() == V9::NOP || I->getOpcode() == V9::PHI))
++numInstr;
assert(S.isched.getNumInstructions() >= numInstr &&
"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
MachineBasicBlock::iterator I = MBB.begin();
for ( ; I != MBB.end(); ++I)
- if (! mii.isDummyPhiInstr(I->getOpcode()))
+ if (I->getOpcode() != V9::PHI)
break;
// Remove all except the dummy PHI instructions from MBB, and
diff --git a/lib/Target/SparcV9/InstrSched/InstrScheduling.cpp b/lib/Target/SparcV9/InstrSched/InstrScheduling.cpp
index 13b629c1b8..fc4d6a7164 100644
--- a/lib/Target/SparcV9/InstrSched/InstrScheduling.cpp
+++ b/lib/Target/SparcV9/InstrSched/InstrScheduling.cpp
@@ -19,6 +19,7 @@
#include "llvm/Target/TargetMachine.h"
#include "../../Target/SparcV9/MachineCodeForInstruction.h"
#include "../../Target/SparcV9/LiveVar/FunctionLiveVarInfo.h"
+#include "../../Target/SparcV9/SparcV9InstrInfo.h"
#include "Support/CommandLine.h"
#include <algorithm>
#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.
unsigned numInstr = 0;
for (MachineBasicBlock::iterator I=MBB.begin(); I != MBB.end(); ++I)
- if (! mii.isNop(I->getOpcode()) &&
- ! mii.isDummyPhiInstr(I->getOpcode()))
+ if (!(I->getOpcode() == V9::NOP || I->getOpcode() == V9::PHI))
++numInstr;
assert(S.isched.getNumInstructions() >= numInstr &&
"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
MachineBasicBlock::iterator I = MBB.begin();
for ( ; I != MBB.end(); ++I)
- if (! mii.isDummyPhiInstr(I->getOpcode()))
+ if (I->getOpcode() != V9::PHI)
break;
// Remove all except the dummy PHI instructions from MBB, and