mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-05-22 19:38:40 +00:00
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
This commit is contained in:
parent
14baebf4ee
commit
8dc9982e2e
@ -44,8 +44,7 @@ struct ValueToDefVecMap: public hash_map<const Value*, RefVec> {
|
|||||||
|
|
||||||
SchedGraphNode::SchedGraphNode(unsigned NID, MachineBasicBlock *mbb,
|
SchedGraphNode::SchedGraphNode(unsigned NID, MachineBasicBlock *mbb,
|
||||||
int indexInBB, const TargetMachine& Target)
|
int indexInBB, const TargetMachine& Target)
|
||||||
: SchedGraphNodeCommon(NID), origIndexInBB(indexInBB), MBB(mbb),
|
: SchedGraphNodeCommon(NID,indexInBB), MBB(mbb), MI(mbb ? (*mbb)[indexInBB] : 0) {
|
||||||
MI(mbb ? (*mbb)[indexInBB] : 0) {
|
|
||||||
if (MI) {
|
if (MI) {
|
||||||
MachineOpCode mopCode = MI->getOpCode();
|
MachineOpCode mopCode = MI->getOpCode();
|
||||||
latency = Target.getInstrInfo().hasResultInterlock(mopCode)
|
latency = Target.getInstrInfo().hasResultInterlock(mopCode)
|
||||||
|
@ -26,7 +26,6 @@ class RefVec;
|
|||||||
|
|
||||||
class SchedGraphNode : public SchedGraphNodeCommon {
|
class SchedGraphNode : public SchedGraphNodeCommon {
|
||||||
|
|
||||||
int origIndexInBB; // original position of machine instr in BB
|
|
||||||
MachineBasicBlock *MBB;
|
MachineBasicBlock *MBB;
|
||||||
const MachineInstr *MI;
|
const MachineInstr *MI;
|
||||||
|
|
||||||
@ -46,7 +45,6 @@ public:
|
|||||||
bool isDummyNode() const { return (MI == NULL); }
|
bool isDummyNode() const { return (MI == NULL); }
|
||||||
MachineBasicBlock &getMachineBasicBlock() const { return *MBB; }
|
MachineBasicBlock &getMachineBasicBlock() const { return *MBB; }
|
||||||
|
|
||||||
int getOrigIndexInBB() const { return origIndexInBB; }
|
|
||||||
void print(std::ostream &os) const;
|
void print(std::ostream &os) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -44,8 +44,7 @@ struct ValueToDefVecMap: public hash_map<const Value*, RefVec> {
|
|||||||
|
|
||||||
SchedGraphNode::SchedGraphNode(unsigned NID, MachineBasicBlock *mbb,
|
SchedGraphNode::SchedGraphNode(unsigned NID, MachineBasicBlock *mbb,
|
||||||
int indexInBB, const TargetMachine& Target)
|
int indexInBB, const TargetMachine& Target)
|
||||||
: SchedGraphNodeCommon(NID), origIndexInBB(indexInBB), MBB(mbb),
|
: SchedGraphNodeCommon(NID,indexInBB), MBB(mbb), MI(mbb ? (*mbb)[indexInBB] : 0) {
|
||||||
MI(mbb ? (*mbb)[indexInBB] : 0) {
|
|
||||||
if (MI) {
|
if (MI) {
|
||||||
MachineOpCode mopCode = MI->getOpCode();
|
MachineOpCode mopCode = MI->getOpCode();
|
||||||
latency = Target.getInstrInfo().hasResultInterlock(mopCode)
|
latency = Target.getInstrInfo().hasResultInterlock(mopCode)
|
||||||
|
@ -26,7 +26,6 @@ class RefVec;
|
|||||||
|
|
||||||
class SchedGraphNode : public SchedGraphNodeCommon {
|
class SchedGraphNode : public SchedGraphNodeCommon {
|
||||||
|
|
||||||
int origIndexInBB; // original position of machine instr in BB
|
|
||||||
MachineBasicBlock *MBB;
|
MachineBasicBlock *MBB;
|
||||||
const MachineInstr *MI;
|
const MachineInstr *MI;
|
||||||
|
|
||||||
@ -46,7 +45,6 @@ public:
|
|||||||
bool isDummyNode() const { return (MI == NULL); }
|
bool isDummyNode() const { return (MI == NULL); }
|
||||||
MachineBasicBlock &getMachineBasicBlock() const { return *MBB; }
|
MachineBasicBlock &getMachineBasicBlock() const { return *MBB; }
|
||||||
|
|
||||||
int getOrigIndexInBB() const { return origIndexInBB; }
|
|
||||||
void print(std::ostream &os) const;
|
void print(std::ostream &os) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user