summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-11-13 21:21:28 +0000
committerDan Gohman <gohman@apple.com>2008-11-13 21:21:28 +0000
commit5a390b974cf0f7ce6d21c3aa101b11d734b6aa6b (patch)
tree32598b1e2d80c828feafaac7b065b30498caa17d /llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
parent60d10c3d2a275f50c2c27b2b0e5aef247849764f (diff)
downloadbcm5719-llvm-5a390b974cf0f7ce6d21c3aa101b11d734b6aa6b.tar.gz
bcm5719-llvm-5a390b974cf0f7ce6d21c3aa101b11d734b6aa6b.zip
Change ScheduleDAG's DAG member from a reference to a pointer, to prepare
for the possibility of scheduling without a SelectionDAG being present. llvm-svn: 59263
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
index 1f898dd7265..8ef493b06e9 100644
--- a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
@@ -20,7 +20,7 @@
#include "llvm/Support/Debug.h"
using namespace llvm;
-ScheduleDAG::ScheduleDAG(SelectionDAG &dag, MachineBasicBlock *bb,
+ScheduleDAG::ScheduleDAG(SelectionDAG *dag, MachineBasicBlock *bb,
const TargetMachine &tm)
: DAG(dag), BB(bb), TM(tm), MRI(BB->getParent()->getRegInfo()) {
TII = TM.getInstrInfo();
@@ -76,17 +76,17 @@ void ScheduleDAG::BuildSchedUnits() {
// Reserve entries in the vector for each of the SUnits we are creating. This
// ensure that reallocation of the vector won't happen, so SUnit*'s won't get
// invalidated.
- SUnits.reserve(DAG.allnodes_size());
+ SUnits.reserve(DAG->allnodes_size());
// During scheduling, the NodeId field of SDNode is used to map SDNodes
// to their associated SUnits by holding SUnits table indices. A value
// of -1 means the SDNode does not yet have an associated SUnit.
- for (SelectionDAG::allnodes_iterator NI = DAG.allnodes_begin(),
- E = DAG.allnodes_end(); NI != E; ++NI)
+ for (SelectionDAG::allnodes_iterator NI = DAG->allnodes_begin(),
+ E = DAG->allnodes_end(); NI != E; ++NI)
NI->setNodeId(-1);
- for (SelectionDAG::allnodes_iterator NI = DAG.allnodes_begin(),
- E = DAG.allnodes_end(); NI != E; ++NI) {
+ for (SelectionDAG::allnodes_iterator NI = DAG->allnodes_begin(),
+ E = DAG->allnodes_end(); NI != E; ++NI) {
if (isPassiveNode(NI)) // Leaf node, e.g. a TargetImmediate.
continue;
@@ -376,7 +376,7 @@ unsigned ScheduleDAG::ComputeMemOperandsEnd(SDNode *Node) {
void ScheduleDAG::dumpSchedule() const {
for (unsigned i = 0, e = Sequence.size(); i != e; i++) {
if (SUnit *SU = Sequence[i])
- SU->dump(&DAG);
+ SU->dump(DAG);
else
cerr << "**** NOOP ****\n";
}
OpenPOWER on IntegriCloud