Lines Matching refs:MIB
309 if (BC.MIB->getJumpTable(Inst)) { in markUnreachableBlocks()
795 IndirectBranchType BranchType = BC.MIB->analyzeIndirectBranch( in processIndirectBranch()
803 IndexRegNum = BC.MIB->getNoRegister(); in processIndirectBranch()
806 const MCSymbol *Sym = BC.MIB->getTargetSymbol(*PCRelBaseInstr, 1); in processIndirectBranch()
831 BC.MIB->replaceMemOperandDisp(*PCRelBaseInstr, in processIndirectBranch()
843 std::tie(TargetSym, TargetOffset) = BC.MIB->getTargetSymbolInfo(DispExpr); in processIndirectBranch()
847 BaseRegNum = BC.MIB->getNoRegister(); in processIndirectBranch()
931 BC.MIB->replaceMemOperandDisp(*MemLocInstr, JTLabel, BC.Ctx.get()); in processIndirectBranch()
932 BC.MIB->setJumpTable(Instruction, ArrayStart, IndexRegNum); in processIndirectBranch()
1019 auto &MIB = BC.MIB; in disassemble() local
1021 BC.SymbolicDisAsm->setSymbolizer(MIB->createTargetSymbolizer(*this)); in disassemble()
1030 if (!MIB->evaluateMemOperandTarget(Instruction, TargetAddress, Address, in disassemble()
1061 MIB->replaceMemOperandDisp(Instruction, in disassemble()
1062 MCOperand::createExpr(BC.MIB->getTargetExprFor( in disassemble()
1078 assert(!MIB->isTailCall(Instruction) && in disassemble()
1085 if (!MIB->convertJmpToTailCall(Instruction)) { in disassemble()
1086 assert(MIB->isConditionalBranch(Instruction) && in disassemble()
1118 bool Result = MIB->convertJmpToTailCall(Instruction); in disassemble()
1132 MIB->createUncondBranch(Instruction, TargetSymbol, BC.Ctx.get()); in disassemble()
1136 MIB->convertJmpToTailCall(Instruction); in disassemble()
1155 Count = MIB->matchLinkerVeneer(Instructions.begin(), Instructions.end(), in disassemble()
1159 MIB->addAnnotation(Instruction, "AArch64Veneer", true); in disassemble()
1163 MIB->addAnnotation(It->second, "AArch64Veneer", true); in disassemble()
1206 if (opts::CheckEncoding && !BC.MIB->isBranch(Instruction) && in disassemble()
1207 !BC.MIB->isCall(Instruction) && !BC.MIB->isNoop(Instruction)) { in disassemble()
1217 if (MIB->hasEVEXEncoding(Instruction)) { in disassemble()
1242 if (MIB->isBranch(Instruction) || MIB->isCall(Instruction)) { in disassemble()
1244 if (MIB->evaluateBranch(Instruction, AbsoluteInstrAddr, Size, in disassemble()
1251 bool IsCall = MIB->isCall(Instruction); in disassemble()
1252 const bool IsCondBranch = MIB->isConditionalBranch(Instruction); in disassemble()
1255 if (BC.MIB->isUnsupportedBranch(Instruction.getOpcode())) { in disassemble()
1294 BC.MIB->createNoop(Instruction); in disassemble()
1311 BC.MIB->replaceBranchTarget(Instruction, TargetSymbol, &*Ctx); in disassemble()
1315 MIB->setConditionalTailCall(Instruction, TargetAddress); in disassemble()
1319 if (MIB->isIndirectBranch(Instruction)) in disassemble()
1322 if (IsSimple && MIB->hasPCRelOperand(Instruction)) in disassemble()
1336 const bool Result = BC.MIB->replaceImmWithSymbolRef( in disassemble()
1348 if (MIB->hasPCRelOperand(Instruction) && !UsedReloc) in disassemble()
1360 MIB->setOffset(Instruction, static_cast<uint32_t>(Offset)); in disassemble()
1362 if (BC.MIB->isNoop(Instruction)) { in disassemble()
1366 MIB->addAnnotation(Instruction, "Size", static_cast<uint32_t>(Size)); in disassemble()
1475 if (BC.MIB->hasPCRelOperand(Instruction)) { in scanExternalRefs()
1476 if (BC.MIB->evaluateMemOperandTarget(Instruction, TargetAddress, in scanExternalRefs()
1480 } else if (BC.MIB->isCall(Instruction) || BC.MIB->isBranch(Instruction)) { in scanExternalRefs()
1481 if (BC.MIB->evaluateBranch(Instruction, AbsoluteInstrAddr, Size, in scanExternalRefs()
1508 BC.MIB->replaceBranchTarget(Instruction, TargetSymbol, in scanExternalRefs()
1513 BC.MIB->replaceMemOperandDisp( in scanExternalRefs()
1514 Instruction, MCOperand::createExpr(BC.MIB->getTargetExprFor( in scanExternalRefs()
1531 const bool Result = BC.MIB->replaceImmWithSymbolRef( in scanExternalRefs()
1551 Optional<Relocation> Rel = BC.MIB->createRelocation(Fixup, *BC.MAB); in scanExternalRefs()
1754 uint16_t LastJTIndexReg = BC.MIB->getNoRegister(); in postProcessIndirectBranches()
1757 if (!BC.MIB->isIndirectBranch(Instr)) in postProcessIndirectBranches()
1763 BC.MIB->convertJmpToTailCall(Instr); in postProcessIndirectBranches()
1770 BC.MIB->convertJmpToTailCall(Instr); in postProcessIndirectBranches()
1776 if (BC.MIB->isTailCall(Instr) || BC.MIB->getJumpTable(Instr)) { in postProcessIndirectBranches()
1783 IndirectBranchType Type = BC.MIB->analyzeIndirectBranch( in postProcessIndirectBranches()
1792 if (BC.MIB->isTailCall(Instr)) { in postProcessIndirectBranches()
1793 BC.MIB->convertTailCallToJmp(Instr); in postProcessIndirectBranches()
1797 LastJT = BC.MIB->getJumpTable(Instr); in postProcessIndirectBranches()
1798 LastJTIndexReg = BC.MIB->getJumpTableIndexReg(Instr); in postProcessIndirectBranches()
1799 BC.MIB->unsetJumpTable(Instr); in postProcessIndirectBranches()
1821 if (BC.MIB->isLeave(Instr) || BC.MIB->isPop(Instr)) { in postProcessIndirectBranches()
1827 BC.MIB->convertJmpToTailCall(Instr); in postProcessIndirectBranches()
1855 BC.MIB->setJumpTable(*LastIndirectJump, LastJT, LastJTIndexReg, AllocId); in postProcessIndirectBranches()
1881 if (!BC.MIB->isInvoke(Instr)) in recomputeLandingPads()
1884 const Optional<MCPlus::MCLandingPad> EHInfo = BC.MIB->getEHInfo(Instr); in recomputeLandingPads()
1899 auto &MIB = BC.MIB; in buildCFG() local
1953 if (!BC.MIB->isPseudo(*RII) && !BC.MIB->isNoop(*RII)) { in buildCFG()
1958 if (LastNonNop && !MIB->getOffset(*LastNonNop)) in buildCFG()
1959 MIB->setOffset(*LastNonNop, static_cast<uint32_t>(Offset), AllocatorId); in buildCFG()
1980 MIB->isNoop(Instr) && BC.SDTMarkers.count(InstrInputAddr); in buildCFG()
1983 if (MIB->isNoop(Instr) || IsLKMarker) { in buildCFG()
1984 if (!MIB->getOffset(Instr)) in buildCFG()
1985 MIB->setOffset(Instr, static_cast<uint32_t>(Offset), AllocatorId); in buildCFG()
1990 MIB->addAnnotation(Instr, "NOP", static_cast<uint32_t>(1), AllocatorId); in buildCFG()
2000 if (MIB->isUnconditionalBranch(Instr) && in buildCFG()
2001 !MIB->isUnconditionalBranch(*PrevInstr) && in buildCFG()
2002 !MIB->getConditionalTailCall(*PrevInstr) && in buildCFG()
2003 !MIB->isReturn(*PrevInstr)) { in buildCFG()
2023 const bool IsBlockEnd = MIB->isTerminator(Instr); in buildCFG()
2024 IsLastInstrNop = MIB->isNoop(Instr); in buildCFG()
2102 IsPrevFT = !MIB->isTerminator(*LastInstr) || in buildCFG()
2103 MIB->getConditionalTailCall(*LastInstr); in buildCFG()
2105 IsPrevFT = MIB->isConditionalBranch(*LastInstr); in buildCFG()
2187 BC.MIB->clearOffset(Inst); in postProcessCFG()
2204 const uint32_t Offset = BC.MIB->getOffsetWithDefault(*std::next(II), 0); in calculateMacroOpFusionStats()
2242 BC.MIB->getConditionalTailCall(*CTCInstr); in removeConditionalTailCalls()
2252 CTCTakenCount = BC.MIB->getAnnotationWithDefault<uint64_t>( in removeConditionalTailCalls()
2254 CTCMispredCount = BC.MIB->getAnnotationWithDefault<uint64_t>( in removeConditionalTailCalls()
2259 assert(!BC.MIB->getEHInfo(*CTCInstr) && in removeConditionalTailCalls()
2264 const MCSymbol *CTCTargetLabel = BC.MIB->getTargetSymbol(*CTCInstr); in removeConditionalTailCalls()
2267 BC.MIB->createTailCall(TailCallInstr, CTCTargetLabel, BC.Ctx.get()); in removeConditionalTailCalls()
2283 BC.MIB->convertTailCallToJmp(*CTCInstr); in removeConditionalTailCalls()
2285 BC.MIB->replaceBranchTarget(*CTCInstr, TailCallBB->getLabel(), in removeConditionalTailCalls()
2295 BC.MIB->unsetConditionalTailCall(*CTCInstr); in removeConditionalTailCalls()
2864 BC.MIB->createTrap(TrapInstr); in setTrapOnEntry()
2925 const MCSymbol *Symbol = BC.MIB->getTargetSymbol(Inst, OpNum); in duplicateConstantIslands()
2948 Operand = MCOperand::createExpr(BC.MIB->getTargetExprFor( in duplicateConstantIslands()
3056 const bool IsJumpTable = LastInstr && BC.MIB->getJumpTable(*LastInstr); in dumpGraph()
3216 auto &MIB = BC.MIB; in fixBranches() local
3251 !MIB->isUnsupportedBranch(CondBranch->getOpcode()); in fixBranches()
3256 MIB->reverseBranchCondition(*CondBranch, TSuccessor->getLabel(), Ctx); in fixBranches()
3261 MIB->replaceBranchTarget(*CondBranch, TSuccessor->getLabel(), Ctx); in fixBranches()
3276 MIB->reverseBranchCondition(*CondBranch, TSuccessor->getLabel(), in fixBranches()
3307 if (BC.MIB->isCFI(Instr)) { in propagateGnuArgsSizeInfo()
3317 } else if (BC.MIB->isInvoke(Instr)) { in propagateGnuArgsSizeInfo()
3319 BC.MIB->addGnuArgsSize(Instr, CurrentGnuArgsSize, AllocId); in propagateGnuArgsSizeInfo()
3333 BC.MIB->isConditionalBranch(*LastInstrRI)) { in postProcessBranches()
3355 if (!BC.MIB->isTerminator(*LastInstrRI) && in postProcessBranches()
3356 !BC.MIB->isCall(*LastInstrRI)) { in postProcessBranches()
3360 BC.MIB->createReturn(ReturnInstr); in postProcessBranches()
3537 if (BC.MIB->getCanonicalBranchCondCode(BC.MIB->getCondCode( in dfs()
3538 *CondBranch)) == BC.MIB->getCondCode(*CondBranch)) { in dfs()
3575 if (BC.MIB->isPseudo(Inst)) in computeHash()
3581 if (BC.MIB->isUnconditionalBranch(Inst)) in computeHash()
3699 if (!BC.MIB->isIndirectBranch(Inst)) in checkForAmbiguousJumpTables()
3701 uint64_t JTAddress = BC.MIB->getJumpTable(Inst); in checkForAmbiguousJumpTables()
3723 if (!BC.MIB->isIndirectBranch(Inst)) in disambiguateJumpTables()
3744 BC.MIB->matchIndJmp(BC.MIB->matchReg(BaseReg1), in disambiguateJumpTables()
3745 BC.MIB->matchImm(Scale), BC.MIB->matchReg(), in disambiguateJumpTables()
3746 /*Offset=*/BC.MIB->matchSymbol(Target)); in disambiguateJumpTables()
3748 *BC.MRI, *BC.MIB, in disambiguateJumpTables()
3750 BaseReg1 != BC.MIB->getNoRegister() || Scale != 8) { in disambiguateJumpTables()
3757 BC.MIB->matchLoad(BC.MIB->matchReg(BaseReg1), in disambiguateJumpTables()
3758 BC.MIB->matchImm(Scale), BC.MIB->matchReg(), in disambiguateJumpTables()
3759 /*Offset=*/BC.MIB->matchSymbol(Target)); in disambiguateJumpTables()
3762 BC.MIB->matchIndJmp(std::move(LoadMatcherOwner)); in disambiguateJumpTables()
3764 *BC.MRI, *BC.MIB, in disambiguateJumpTables()
3766 BaseReg1 != BC.MIB->getNoRegister() || Scale != 8) { in disambiguateJumpTables()
3776 BC.MIB->matchIndJmp(BC.MIB->matchAdd( in disambiguateJumpTables()
3777 BC.MIB->matchReg(BaseReg1), in disambiguateJumpTables()
3778 BC.MIB->matchLoad(BC.MIB->matchReg(BaseReg2), in disambiguateJumpTables()
3779 BC.MIB->matchImm(Scale), BC.MIB->matchReg(), in disambiguateJumpTables()
3780 BC.MIB->matchImm(Offset)))); in disambiguateJumpTables()
3782 BC.MIB->matchLoadAddr(BC.MIB->matchSymbol(Target)); in disambiguateJumpTables()
3785 BC.MIB->matchIndJmp(BC.MIB->matchAdd(std::move(LEAMatcherOwner), in disambiguateJumpTables()
3786 BC.MIB->matchAnyOperand())); in disambiguateJumpTables()
3788 *BC.MRI, *BC.MIB, in disambiguateJumpTables()
3792 *BC.MRI, *BC.MIB, in disambiguateJumpTables()
3811 BC.MIB->replaceMemOperandDisp(*JTLoadInst, NewJTLabel, BC.Ctx.get()); in disambiguateJumpTables()
3815 BC.MIB->setJumpTable(Inst, NewJumpTableID, 0, AllocId); in disambiguateJumpTables()
3824 if (!Instr || !BC.MIB->isIndirectBranch(*Instr)) in replaceJumpTableEntryIn()
3826 uint64_t JTAddress = BC.MIB->getJumpTable(*Instr); in replaceJumpTableEntryIn()
3892 *BB->succ_begin() == *NextBB && Last && !BC.MIB->isBranch(*Last)) { in deleteConservativeEdges()
3899 if (!Last || !BC.MIB->isCall(*Last)) in deleteConservativeEdges()
3902 const MCSymbol *CalleeSymbol = BC.MIB->getTargetSymbol(*Last); in deleteConservativeEdges()
4287 if (Offset == BC.MIB->getOffsetWithDefault(Inst, InvalidOffset)) in getInstructionAtOffset()
4293 BC.MIB->getAnnotationWithDefault<uint32_t>(*LastInstr, "Size"); in getInstructionAtOffset()
4442 if (!BC.MIB->hasAnnotation(Inst, "AArch64Veneer")) in isAArch64Veneer()
4447 if (!BC.MIB->isNoop(Inst)) in isAArch64Veneer()