mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
misched: DAG builder must special case earlyclobber
llvm-svn: 155459
This commit is contained in:
parent
0b0b66833e
commit
4c57a9bcf1
@ -442,6 +442,15 @@ void ScheduleDAGInstrs::addVRegUseDeps(SUnit *SU, unsigned OperIdx) {
|
|||||||
SlotIndex UseIdx = LIS->getInstructionIndex(MI).getRegSlot();
|
SlotIndex UseIdx = LIS->getInstructionIndex(MI).getRegSlot();
|
||||||
LiveInterval *LI = &LIS->getInterval(Reg);
|
LiveInterval *LI = &LIS->getInterval(Reg);
|
||||||
VNInfo *VNI = LI->getVNInfoBefore(UseIdx);
|
VNInfo *VNI = LI->getVNInfoBefore(UseIdx);
|
||||||
|
|
||||||
|
// Special case: An early-clobber tied operand reads and writes the
|
||||||
|
// register one slot early. e.g. InlineAsm.
|
||||||
|
//
|
||||||
|
// FIXME: Same special case is in shrinkToUses. Hide under an API.
|
||||||
|
if (SlotIndex::isSameInstr(VNI->def, UseIdx)) {
|
||||||
|
UseIdx = VNI->def;
|
||||||
|
VNI = LI->getVNInfoBefore(UseIdx);
|
||||||
|
}
|
||||||
// VNI will be valid because MachineOperand::readsReg() is checked by caller.
|
// VNI will be valid because MachineOperand::readsReg() is checked by caller.
|
||||||
MachineInstr *Def = LIS->getInstructionFromIndex(VNI->def);
|
MachineInstr *Def = LIS->getInstructionFromIndex(VNI->def);
|
||||||
// Phis and other noninstructions (after coalescing) have a NULL Def.
|
// Phis and other noninstructions (after coalescing) have a NULL Def.
|
||||||
|
Loading…
Reference in New Issue
Block a user