Lines Matching refs:InstrMeta

122 FileAnalysis::getPrevInstructionSequential(const Instr &InstrMeta) const {  in getPrevInstructionSequential()
124 Instructions.find(InstrMeta.VMAddress); in getPrevInstructionSequential()
135 FileAnalysis::getNextInstructionSequential(const Instr &InstrMeta) const { in getNextInstructionSequential()
137 Instructions.find(InstrMeta.VMAddress); in getNextInstructionSequential()
147 bool FileAnalysis::usesRegisterOperand(const Instr &InstrMeta) const { in usesRegisterOperand()
148 for (const auto &Operand : InstrMeta.Instruction) { in usesRegisterOperand()
169 bool FileAnalysis::isCFITrap(const Instr &InstrMeta) const { in isCFITrap()
170 const auto &InstrDesc = MII->get(InstrMeta.Instruction.getOpcode()); in isCFITrap()
171 return InstrDesc.isTrap() || willTrapOnCFIViolation(InstrMeta); in isCFITrap()
174 bool FileAnalysis::willTrapOnCFIViolation(const Instr &InstrMeta) const { in willTrapOnCFIViolation()
175 const auto &InstrDesc = MII->get(InstrMeta.Instruction.getOpcode()); in willTrapOnCFIViolation()
179 if (!MIA->evaluateBranch(InstrMeta.Instruction, InstrMeta.VMAddress, in willTrapOnCFIViolation()
180 InstrMeta.InstructionSize, Target)) in willTrapOnCFIViolation()
185 bool FileAnalysis::canFallThrough(const Instr &InstrMeta) const { in canFallThrough()
186 if (!InstrMeta.Valid) in canFallThrough()
189 if (isCFITrap(InstrMeta)) in canFallThrough()
192 const auto &InstrDesc = MII->get(InstrMeta.Instruction.getOpcode()); in canFallThrough()
193 if (InstrDesc.mayAffectControlFlow(InstrMeta.Instruction, *RegisterInfo)) in canFallThrough()
200 FileAnalysis::getDefiniteNextInstruction(const Instr &InstrMeta) const { in getDefiniteNextInstruction()
201 if (!InstrMeta.Valid) in getDefiniteNextInstruction()
204 if (isCFITrap(InstrMeta)) in getDefiniteNextInstruction()
207 const auto &InstrDesc = MII->get(InstrMeta.Instruction.getOpcode()); in getDefiniteNextInstruction()
209 if (InstrDesc.mayAffectControlFlow(InstrMeta.Instruction, *RegisterInfo)) { in getDefiniteNextInstruction()
214 if (!MIA->evaluateBranch(InstrMeta.Instruction, InstrMeta.VMAddress, in getDefiniteNextInstruction()
215 InstrMeta.InstructionSize, Target)) in getDefiniteNextInstruction()
221 getInstruction(InstrMeta.VMAddress + InstrMeta.InstructionSize); in getDefiniteNextInstruction()
231 FileAnalysis::getDirectControlFlowXRefs(const Instr &InstrMeta) const { in getDirectControlFlowXRefs()
233 const Instr *PrevInstruction = getPrevInstructionSequential(InstrMeta); in getDirectControlFlowXRefs()
238 const auto &TargetRefsKV = StaticBranchTargetings.find(InstrMeta.VMAddress); in getDirectControlFlowXRefs()
248 << format_hex(InstrMeta.VMAddress, 2) << ".\n"; in getDirectControlFlowXRefs()
366 void FileAnalysis::printInstruction(const Instr &InstrMeta, in printInstruction() argument
368 Printer->printInst(&InstrMeta.Instruction, 0, "", *SubtargetInfo.get(), OS); in printInstruction()
479 Instr InstrMeta; in parseSectionContents() local
491 InstrMeta.Instruction = Instruction; in parseSectionContents()
492 InstrMeta.VMAddress = VMAddress; in parseSectionContents()
493 InstrMeta.InstructionSize = InstructionSize; in parseSectionContents()
494 InstrMeta.Valid = ValidInstruction; in parseSectionContents()
496 addInstruction(InstrMeta); in parseSectionContents()
514 if (!usesRegisterOperand(InstrMeta)) in parseSectionContents()