summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Laskey <jlaskey@mac.com>2005-09-27 17:32:45 +0000
committerJim Laskey <jlaskey@mac.com>2005-09-27 17:32:45 +0000
commit5324fec6449555a76fa622a1a90760d42c50bd6b (patch)
treecc5d23f35036a9e56d1205e7c26debecbee01aac
parent09f00b1295f8204117a12e075aa062eed08905ec (diff)
downloadexternal_llvm-5324fec6449555a76fa622a1a90760d42c50bd6b.zip
external_llvm-5324fec6449555a76fa622a1a90760d42c50bd6b.tar.gz
external_llvm-5324fec6449555a76fa622a1a90760d42c50bd6b.tar.bz2
Remove some redundancies.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23469 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/SelectionDAG/ScheduleDAG.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
index 1645298..c4e7207 100644
--- a/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
@@ -197,7 +197,6 @@ struct ScheduleInfo {
SDOperand Op; // Operand information
unsigned Latency; // Cycles to complete instruction
unsigned ResourceSet; // Bit vector of usable resources
- bool IsBoundary; // Do not shift passed this instruction.
unsigned Slot; // Operand's time slot
// Ctor.
@@ -205,7 +204,6 @@ struct ScheduleInfo {
: Op(op)
, Latency(0)
, ResourceSet(0)
- , IsBoundary(false)
, Slot(0)
{}
};
@@ -452,10 +450,10 @@ void SimpleSched::GatherOperandInfo() {
MachineOpCode TOpc = Op.getTargetOpcode();
// FIXME SI->Latency = std::max(1, TII.maxLatency(TOpc));
// FIXME SI->ResourceSet = TII.resources(TOpc);
- // There is a cost for keeping values across a call.
- SI->IsBoundary = TII.isCall(TOpc);
-
- if (TII.isLoad(TOpc)) {
+ if (TII.isCall(TOpc)) {
+ SI->ResourceSet = RSInteger;
+ SI->Latency = 40;
+ } else if (TII.isLoad(TOpc)) {
SI->ResourceSet = RSLoadStore;
SI->Latency = 5;
} else if (TII.isStore(TOpc)) {
@@ -526,7 +524,11 @@ bool SimpleSched::isStrongDependency(SDNode *A, SDNode *B) {
/// conflict with operands of B.
bool SimpleSched::isWeakDependency(SDNode *A, SDNode *B) {
// TODO check for conflicting real registers and aliases
+#if 0 // Since we are in SSA form and not checking register aliasing
return A->getOpcode() == ISD::EntryToken || isStrongDependency(B, A);
+#else
+ return A->getOpcode() == ISD::EntryToken;
+#endif
}
/// ScheduleBackward - Schedule instructions so that any long latency
@@ -554,8 +556,7 @@ void SimpleSched::ScheduleBackward() {
if (isStrongDependency(SI->Op, Other->Op)) {
Slot = Other->Slot + Other->Latency;
break;
- } else if (SI->IsBoundary || Other->IsBoundary ||
- isWeakDependency(SI->Op, Other->Op)) {
+ } else if (isWeakDependency(SI->Op, Other->Op)) {
Slot = Other->Slot;
break;
}
@@ -609,8 +610,7 @@ void SimpleSched::ScheduleForward() {
if (isStrongDependency(Other->Op, SI->Op)) {
Slot = Other->Slot + Other->Latency;
break;
- } else if (SI->IsBoundary || Other->IsBoundary ||
- isWeakDependency(Other->Op, SI->Op)) {
+ } else if (isWeakDependency(Other->Op, SI->Op)) {
Slot = Other->Slot;
break;
}