forked from OSchip/llvm-project
EmitDbgValue doesn't need its EdgeMapping argument.
llvm-svn: 102742
This commit is contained in:
parent
b492b81a94
commit
8acc8f7dfd
|
@ -521,9 +521,9 @@ InstrEmitter::EmitCopyToRegClassNode(SDNode *Node,
|
||||||
|
|
||||||
/// EmitDbgValue - Generate machine instruction for a dbg_value node.
|
/// EmitDbgValue - Generate machine instruction for a dbg_value node.
|
||||||
///
|
///
|
||||||
MachineInstr *InstrEmitter::EmitDbgValue(SDDbgValue *SD,
|
MachineInstr *
|
||||||
DenseMap<SDValue, unsigned> &VRBaseMap,
|
InstrEmitter::EmitDbgValue(SDDbgValue *SD,
|
||||||
DenseMap<MachineBasicBlock*, MachineBasicBlock*> *EM) {
|
DenseMap<SDValue, unsigned> &VRBaseMap) {
|
||||||
uint64_t Offset = SD->getOffset();
|
uint64_t Offset = SD->getOffset();
|
||||||
MDNode* MDPtr = SD->getMDPtr();
|
MDNode* MDPtr = SD->getMDPtr();
|
||||||
DebugLoc DL = SD->getDebugLoc();
|
DebugLoc DL = SD->getDebugLoc();
|
||||||
|
|
|
@ -103,8 +103,7 @@ public:
|
||||||
/// EmitDbgValue - Generate machine instruction for a dbg_value node.
|
/// EmitDbgValue - Generate machine instruction for a dbg_value node.
|
||||||
///
|
///
|
||||||
MachineInstr *EmitDbgValue(SDDbgValue *SD,
|
MachineInstr *EmitDbgValue(SDDbgValue *SD,
|
||||||
DenseMap<SDValue, unsigned> &VRBaseMap,
|
DenseMap<SDValue, unsigned> &VRBaseMap);
|
||||||
DenseMap<MachineBasicBlock*, MachineBasicBlock*> *EM);
|
|
||||||
|
|
||||||
/// EmitNode - Generate machine code for a node and needed dependencies.
|
/// EmitNode - Generate machine code for a node and needed dependencies.
|
||||||
///
|
///
|
||||||
|
|
|
@ -422,7 +422,6 @@ namespace {
|
||||||
// instructions in the right order.
|
// instructions in the right order.
|
||||||
static void ProcessSourceNode(SDNode *N, SelectionDAG *DAG,
|
static void ProcessSourceNode(SDNode *N, SelectionDAG *DAG,
|
||||||
InstrEmitter &Emitter,
|
InstrEmitter &Emitter,
|
||||||
DenseMap<MachineBasicBlock*, MachineBasicBlock*> *EM,
|
|
||||||
DenseMap<SDValue, unsigned> &VRBaseMap,
|
DenseMap<SDValue, unsigned> &VRBaseMap,
|
||||||
SmallVector<std::pair<unsigned, MachineInstr*>, 32> &Orders,
|
SmallVector<std::pair<unsigned, MachineInstr*>, 32> &Orders,
|
||||||
SmallSet<unsigned, 8> &Seen) {
|
SmallSet<unsigned, 8> &Seen) {
|
||||||
|
@ -449,7 +448,7 @@ static void ProcessSourceNode(SDNode *N, SelectionDAG *DAG,
|
||||||
continue;
|
continue;
|
||||||
unsigned DVOrder = DVs[i]->getOrder();
|
unsigned DVOrder = DVs[i]->getOrder();
|
||||||
if (DVOrder == ++Order) {
|
if (DVOrder == ++Order) {
|
||||||
MachineInstr *DbgMI = Emitter.EmitDbgValue(DVs[i], VRBaseMap, EM);
|
MachineInstr *DbgMI = Emitter.EmitDbgValue(DVs[i], VRBaseMap);
|
||||||
if (DbgMI) {
|
if (DbgMI) {
|
||||||
Orders.push_back(std::make_pair(DVOrder, DbgMI));
|
Orders.push_back(std::make_pair(DVOrder, DbgMI));
|
||||||
BB->insert(InsertPos, DbgMI);
|
BB->insert(InsertPos, DbgMI);
|
||||||
|
@ -475,7 +474,7 @@ EmitSchedule(DenseMap<MachineBasicBlock*, MachineBasicBlock*> *EM) {
|
||||||
SDDbgInfo::DbgIterator PDI = DAG->ByvalParmDbgBegin();
|
SDDbgInfo::DbgIterator PDI = DAG->ByvalParmDbgBegin();
|
||||||
SDDbgInfo::DbgIterator PDE = DAG->ByvalParmDbgEnd();
|
SDDbgInfo::DbgIterator PDE = DAG->ByvalParmDbgEnd();
|
||||||
for (; PDI != PDE; ++PDI) {
|
for (; PDI != PDE; ++PDI) {
|
||||||
MachineInstr *DbgMI= Emitter.EmitDbgValue(*PDI, VRBaseMap, EM);
|
MachineInstr *DbgMI= Emitter.EmitDbgValue(*PDI, VRBaseMap);
|
||||||
if (DbgMI)
|
if (DbgMI)
|
||||||
BB->insert(BB->end(), DbgMI);
|
BB->insert(BB->end(), DbgMI);
|
||||||
}
|
}
|
||||||
|
@ -507,14 +506,14 @@ EmitSchedule(DenseMap<MachineBasicBlock*, MachineBasicBlock*> *EM) {
|
||||||
VRBaseMap, EM);
|
VRBaseMap, EM);
|
||||||
// Remember the source order of the inserted instruction.
|
// Remember the source order of the inserted instruction.
|
||||||
if (HasDbg)
|
if (HasDbg)
|
||||||
ProcessSourceNode(N, DAG, Emitter, EM, VRBaseMap, Orders, Seen);
|
ProcessSourceNode(N, DAG, Emitter, VRBaseMap, Orders, Seen);
|
||||||
FlaggedNodes.pop_back();
|
FlaggedNodes.pop_back();
|
||||||
}
|
}
|
||||||
Emitter.EmitNode(SU->getNode(), SU->OrigNode != SU, SU->isCloned,
|
Emitter.EmitNode(SU->getNode(), SU->OrigNode != SU, SU->isCloned,
|
||||||
VRBaseMap, EM);
|
VRBaseMap, EM);
|
||||||
// Remember the source order of the inserted instruction.
|
// Remember the source order of the inserted instruction.
|
||||||
if (HasDbg)
|
if (HasDbg)
|
||||||
ProcessSourceNode(SU->getNode(), DAG, Emitter, EM, VRBaseMap, Orders,
|
ProcessSourceNode(SU->getNode(), DAG, Emitter, VRBaseMap, Orders,
|
||||||
Seen);
|
Seen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -553,7 +552,7 @@ EmitSchedule(DenseMap<MachineBasicBlock*, MachineBasicBlock*> *EM) {
|
||||||
#endif
|
#endif
|
||||||
if ((*DI)->isInvalidated())
|
if ((*DI)->isInvalidated())
|
||||||
continue;
|
continue;
|
||||||
MachineInstr *DbgMI = Emitter.EmitDbgValue(*DI, VRBaseMap, EM);
|
MachineInstr *DbgMI = Emitter.EmitDbgValue(*DI, VRBaseMap);
|
||||||
if (DbgMI) {
|
if (DbgMI) {
|
||||||
if (!LastOrder)
|
if (!LastOrder)
|
||||||
// Insert to start of the BB (after PHIs).
|
// Insert to start of the BB (after PHIs).
|
||||||
|
@ -573,7 +572,7 @@ EmitSchedule(DenseMap<MachineBasicBlock*, MachineBasicBlock*> *EM) {
|
||||||
MachineBasicBlock *InsertBB = Emitter.getBlock();
|
MachineBasicBlock *InsertBB = Emitter.getBlock();
|
||||||
MachineBasicBlock::iterator Pos= Emitter.getBlock()->getFirstTerminator();
|
MachineBasicBlock::iterator Pos= Emitter.getBlock()->getFirstTerminator();
|
||||||
if (!(*DI)->isInvalidated()) {
|
if (!(*DI)->isInvalidated()) {
|
||||||
MachineInstr *DbgMI= Emitter.EmitDbgValue(*DI, VRBaseMap, EM);
|
MachineInstr *DbgMI= Emitter.EmitDbgValue(*DI, VRBaseMap);
|
||||||
if (DbgMI)
|
if (DbgMI)
|
||||||
InsertBB->insert(Pos, DbgMI);
|
InsertBB->insert(Pos, DbgMI);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue