Lines Matching defs:CFI
465 OS << "\n CFI Instrs : " << FrameInstructions.size();
544 OS << " CFI State : " << BB->getCFIState() << '\n';
610 // In CFG_Finalized state we can miscalculate CFI state at exit.
614 OS << " CFI State: " << CFIStateAtExit << '\n';
642 OS << "DWARF CFI Instructions:\n";
647 assert(Elmt.second < FrameInstructions.size() && "Incorrect CFI offset");
654 const MCCFIInstruction &CFI = FrameInstructions[I];
656 BinaryContext::printCFI(OS, CFI);
681 assert(ExprBytes.size() > 1 && "DWARF expression CFI is too short");
685 "invalid DWARF expression CFI");
693 assert(Size > 0 && "Invalid reg encoding for DWARF expression CFI");
706 assert(OldCFI && "invalid CFI instr");
746 assert(OldCFI && "invalid CFI instr");
2160 // Add associated CFI pseudos in the first offset
2170 // Add associated CFI instrs. We always add the CFI instruction that is
2171 // located immediately after this instruction, since the next CFI
2265 // Assign CFI information to each BB entry.
2462 // This is an index of the last processed CFI in FDE CFI program.
2465 // This is an index of RememberState CFI reflecting effective state right
2466 // after execution of RestoreState CFI.
2468 // It differs from State iff the CFI at (State-1)
2472 // CFI programs.
2482 const MCCFIInstruction *CFI = getCFIFor(Instr);
2483 if (!CFI)
2488 switch (CFI->getOperation()) {
2494 assert(!StateStack.empty() && "corrupt CFI stack");
2499 // OpGnuArgsSize CFIs do not affect the CFI state.
2502 // Any other CFI updates the state.
2510 BC.errs() << "BOLT-WARNING: non-empty CFI stack at the end of " << *this
2517 /// Our full interpretation of a DWARF CFI machine state at a given point
2520 /// point, or the number of a rule (CFI state) that computes it with a
2521 /// DWARF expression. This number will be negative if it refers to a CFI
2526 /// Mapping of rules (CFI states) that define the location of each
2528 /// was ever read. This number will be negative if it refers to a CFI
2537 /// Current FDE CFI number representing the state where the snapshot is at
2545 /// Update our snapshot by executing a single CFI
2594 llvm_unreachable("unsupported CFI opcode");
2599 // do not affect CFI state
2605 /// Advance state reading FDE CFI instructions up to State number
2630 /// Interpret all CIE and FDE instructions up until CFI State number and
2652 /// A CFI snapshot with the capability of checking if incremental additions to
2653 /// it are redundant. This is used to ensure we do not emit two CFI instructions
2655 /// CFI at all when the state at that point would not be modified after that CFI
2734 llvm_unreachable("unsupported CFI opcode");
2739 // do not affect CFI state
2885 llvm_unreachable("unsupported CFI opcode");
2888 // do not affect CFI state
2912 // tricky. When rewriting the CFI, we omit remember-restore state instructions
2919 if (const MCCFIInstruction *CFI = getCFIFor(*II)) {
2920 if (CFI->getOperation() == MCCFIInstruction::OpRememberState) {
2924 if (CFI->getOperation() == MCCFIInstruction::OpRestoreState) {
2938 dbgs() << "Trying to fix CFI states for each BB after reordering.\n");
2939 LLVM_DEBUG(dbgs() << "This is the list of CFI states for each BB of " << *this
2946 // to reset the CFI state.
2956 // to be. To solve this, we need to insert CFI instructions to undo
2957 // the effect of all CFI from BB's state to current State.
2961 // If BB's CFI state is greater than State, it means we are behind in
2977 const MCCFIInstruction *CFI = getCFIFor(*II);
2978 if (CFI && (CFI->getOperation() == MCCFIInstruction::OpRememberState ||
2979 CFI->getOperation() == MCCFIInstruction::OpRestoreState)) {
3183 OS << format("\"%s\" [label=\"%s%s\\n(C:%lu,O:%lu,I:%u,L:%u,CFI:%u)\\n",
3485 // invoke instructions until the next CFI overrides it.
3493 const MCCFIInstruction *CFI = getCFIFor(Instr);
3494 if (CFI->getOperation() == MCCFIInstruction::OpGnuArgsSize) {
3495 CurrentGnuArgsSize = CFI->getOffset();
4036 // Update CFI and BB layout with new intermediate BB