llvm.org GIT mirror llvm / 8dc9982
Moved index into BB to common graph class because its needed by ModuloSchedGraph. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8174 91177308-0d34-0410-b5e6-96231b3b80d8 Tanya Lattner 17 years ago
4 changed file(s) with 2 addition(s) and 8 deletion(s). Raw diff Collapse all Expand all
4343
4444 SchedGraphNode::SchedGraphNode(unsigned NID, MachineBasicBlock *mbb,
4545 int indexInBB, const TargetMachine& Target)
46 : SchedGraphNodeCommon(NID), origIndexInBB(indexInBB), MBB(mbb),
47 MI(mbb ? (*mbb)[indexInBB] : 0) {
46 : SchedGraphNodeCommon(NID,indexInBB), MBB(mbb), MI(mbb ? (*mbb)[indexInBB] : 0) {
4847 if (MI) {
4948 MachineOpCode mopCode = MI->getOpCode();
5049 latency = Target.getInstrInfo().hasResultInterlock(mopCode)
2525
2626 class SchedGraphNode : public SchedGraphNodeCommon {
2727
28 int origIndexInBB; // original position of machine instr in BB
2928 MachineBasicBlock *MBB;
3029 const MachineInstr *MI;
3130
4544 bool isDummyNode() const { return (MI == NULL); }
4645 MachineBasicBlock &getMachineBasicBlock() const { return *MBB; }
4746
48 int getOrigIndexInBB() const { return origIndexInBB; }
4947 void print(std::ostream &os) const;
5048 };
5149
4343
4444 SchedGraphNode::SchedGraphNode(unsigned NID, MachineBasicBlock *mbb,
4545 int indexInBB, const TargetMachine& Target)
46 : SchedGraphNodeCommon(NID), origIndexInBB(indexInBB), MBB(mbb),
47 MI(mbb ? (*mbb)[indexInBB] : 0) {
46 : SchedGraphNodeCommon(NID,indexInBB), MBB(mbb), MI(mbb ? (*mbb)[indexInBB] : 0) {
4847 if (MI) {
4948 MachineOpCode mopCode = MI->getOpCode();
5049 latency = Target.getInstrInfo().hasResultInterlock(mopCode)
2525
2626 class SchedGraphNode : public SchedGraphNodeCommon {
2727
28 int origIndexInBB; // original position of machine instr in BB
2928 MachineBasicBlock *MBB;
3029 const MachineInstr *MI;
3130
4544 bool isDummyNode() const { return (MI == NULL); }
4645 MachineBasicBlock &getMachineBasicBlock() const { return *MBB; }
4746
48 int getOrigIndexInBB() const { return origIndexInBB; }
4947 void print(std::ostream &os) const;
5048 };
5149