Lines Matching defs:MI

1335 static bool isDbgValueInDefinedReg(const MachineInstr *MI) {
1336 assert(MI->isDebugValue() && "Invalid DBG_VALUE machine instruction!");
1337 return MI->getNumOperands() == 3 &&
1338 MI->getOperand(0).isReg() && MI->getOperand(0).getReg() &&
1339 (MI->getOperand(1).isImm() ||
1340 (MI->getOperand(1).isReg() && MI->getOperand(1).getReg() == 0U));
1343 // Get .debug_loc entry for the instruction range starting at MI.
1347 const MachineInstr *MI) {
1348 const MDNode *Var = MI->getOperand(MI->getNumOperands() - 1).getMetadata();
1350 assert(MI->getNumOperands() == 3);
1351 if (MI->getOperand(0).isReg()) {
1355 if (!MI->getOperand(1).isImm())
1356 MLoc.set(MI->getOperand(0).getReg());
1358 MLoc.set(MI->getOperand(0).getReg(), MI->getOperand(1).getImm());
1361 if (MI->getOperand(0).isImm())
1362 return DotDebugLocEntry(FLabel, SLabel, MI->getOperand(0).getImm());
1363 if (MI->getOperand(0).isFPImm())
1364 return DotDebugLocEntry(FLabel, SLabel, MI->getOperand(0).getFPImm());
1365 if (MI->getOperand(0).isCImm())
1366 return DotDebugLocEntry(FLabel, SLabel, MI->getOperand(0).getCImm());
1477 MCSymbol *DwarfDebug::getLabelBeforeInsn(const MachineInstr *MI) {
1478 MCSymbol *Label = LabelsBeforeInsn.lookup(MI);
1484 MCSymbol *DwarfDebug::getLabelAfterInsn(const MachineInstr *MI) {
1485 return LabelsAfterInsn.lookup(MI);
1489 void DwarfDebug::beginInstruction(const MachineInstr *MI) {
1491 if (!MI->isDebugValue()) {
1492 DebugLoc DL = MI->getDebugLoc();
1513 LabelsBeforeInsn.find(MI);
1531 void DwarfDebug::endInstruction(const MachineInstr *MI) {
1534 if (!MI->isDebugValue())
1538 LabelsAfterInsn.find(MI);
1657 const MachineInstr *MI = II;
1659 if (MI->isDebugValue()) {
1660 assert(MI->getNumOperands() > 1 && "Invalid machine instruction!");
1664 MI->getOperand(MI->getNumOperands() - 1).getMetadata();
1667 if (isDbgValueInDefinedReg(MI))
1668 LiveUserVar[MI->getOperand(0).getReg()] = Var;
1679 LabelsBeforeInsn[MI] = FunctionBeginSym;
1693 // Terminate old register assignments that don't reach MI;
1712 History.push_back(MI);
1715 if (!MI->isLabel())
1720 if (!MI->getFlag(MachineInstr::FrameSetup) &&
1721 (PrologEndLoc.isUnknown() && !MI->getDebugLoc().isUnknown()))
1722 PrologEndLoc = MI->getDebugLoc();
1725 for (MachineInstr::const_mop_iterator MOI = MI->operands_begin(),
1726 MOE = MI->operands_end();
1749 if (!Prev->isDebugValue() || Prev->getParent() != MI->getParent())
1756 History.push_back(MI);
1785 const MachineInstr *MI = History[i];
1786 if (MI->isDebugValue())
1787 requestLabelBeforeInsn(MI);
1789 requestLabelAfterInsn(MI);