-//===-- MSchedGraph.cpp - Scheduling Graph ------------------------*- C++ -*-===//
+//===-- MSchedGraph.cpp - Scheduling Graph ----------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/Target/TargetInstrInfo.h"
#include "Support/Debug.h"
+#include <cstdlib>
using namespace llvm;
MSchedGraphNode::MSchedGraphNode(const MachineInstr* inst,
MSchedGraphEdge MSchedGraphNode::getInEdge(MSchedGraphNode *pred) {
//Loop over all the successors of our predecessor
//return the edge the corresponds to this in edge
- for(MSchedGraphNode::succ_iterator I = pred->succ_begin(), E = pred->succ_end();
- I != E; ++I) {
- if(*I == this)
+ for (MSchedGraphNode::succ_iterator I = pred->succ_begin(),
+ E = pred->succ_end(); I != E; ++I) {
+ if (*I == this)
return I.getEdge();
}
assert(0 && "Should have found edge between this node and its predecessor!");
-
+ abort();
}
unsigned MSchedGraphNode::getInEdgeNum(MSchedGraphNode *pred) {
-//===-- MSchedGraph.cpp - Scheduling Graph ------------------------*- C++ -*-===//
+//===-- MSchedGraph.cpp - Scheduling Graph ----------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/Target/TargetInstrInfo.h"
#include "Support/Debug.h"
+#include <cstdlib>
using namespace llvm;
MSchedGraphNode::MSchedGraphNode(const MachineInstr* inst,
MSchedGraphEdge MSchedGraphNode::getInEdge(MSchedGraphNode *pred) {
//Loop over all the successors of our predecessor
//return the edge the corresponds to this in edge
- for(MSchedGraphNode::succ_iterator I = pred->succ_begin(), E = pred->succ_end();
- I != E; ++I) {
- if(*I == this)
+ for (MSchedGraphNode::succ_iterator I = pred->succ_begin(),
+ E = pred->succ_end(); I != E; ++I) {
+ if (*I == this)
return I.getEdge();
}
assert(0 && "Should have found edge between this node and its predecessor!");
-
+ abort();
}
unsigned MSchedGraphNode::getInEdgeNum(MSchedGraphNode *pred) {