Lines Matching refs:BC

30 bool getStackAdjustmentSize(const BinaryContext &BC, const MCInst &Inst,  in getStackAdjustmentSize()  argument
32 return BC.MIB->evaluateStackOffsetExpr( in getStackAdjustmentSize()
33 Inst, Adjustment, std::make_pair(BC.MIB->getStackPointer(), 0LL), in getStackAdjustmentSize()
37 bool isIndifferentToSP(const MCInst &Inst, const BinaryContext &BC) { in isIndifferentToSP() argument
38 if (BC.MIB->isCFI(Inst)) in isIndifferentToSP()
41 const MCInstrDesc II = BC.MII->get(Inst.getOpcode()); in isIndifferentToSP()
42 if (BC.MIB->isTerminator(Inst) || in isIndifferentToSP()
43 II.hasImplicitDefOfPhysReg(BC.MIB->getStackPointer(), BC.MRI.get()) || in isIndifferentToSP()
44 II.hasImplicitUseOfPhysReg(BC.MIB->getStackPointer())) in isIndifferentToSP()
48 if (Operand.isReg() && Operand.getReg() == BC.MIB->getStackPointer()) in isIndifferentToSP()
69 BinaryContext &BC = BF.getBinaryContext(); in combineAdjustments() local
74 if (isIndifferentToSP(Inst, BC)) in combineAdjustments()
78 if (!Prev || !BC.MIB->isStackAdjustment(Inst) || in combineAdjustments()
79 !BC.MIB->isStackAdjustment(*Prev) || in combineAdjustments()
80 !getStackAdjustmentSize(BC, *Prev, Adjustment)) { in combineAdjustments()
92 if (BC.MIB->isSUB(Inst)) in combineAdjustments()
95 BC.MIB->addToImm(Inst, Adjustment, BC.Ctx.get()); in combineAdjustments()
111 void AllocCombinerPass::runOnFunctions(BinaryContext &BC) { in runOnFunctions() argument
115 runForAllWeCare(BC.getBinaryFunctions(), [&](BinaryFunction &Function) { in runOnFunctions()