[llvm] Spill/restore FP/BP around instructions in which they are clobbered (PR #81048)
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 2 16:16:15 PDT 2024
================
@@ -228,17 +232,23 @@ void CFIInstrInserter::calculateOutgoingCFAInfo(MBBCFAInfo &MBBInfo) {
case MCCFIInstruction::OpRememberState:
// TODO: Add support for handling cfi_remember_state.
#ifndef NDEBUG
- report_fatal_error(
- "Support for cfi_remember_state not implemented! Value of CFA "
- "may be incorrect!\n");
+ // Currently we need cfi_remember_state and cfi_restore_state to be in
+ // the same BB, so it will not impact outgoing CFA.
+ ++RememberState;
+ if (RememberState != 1)
+ report_fatal_error(
----------------
rnk wrote:
This is existing code, but I generally try to recommend `MCContext::reportError` over `report_fatal_error`. We do have actual non-fatal error handling facilities during CodeGen.
https://github.com/llvm/llvm-project/pull/81048
More information about the llvm-commits
mailing list