[PATCH] D143248: Emit CFI directives in epilogue and enable CFIFixup pass for RISC-V.

Shiva Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 16 02:43:17 PST 2023


shiva0217 added a comment.

Hi Varun,

It might be good to have a simple case to illustrate that cfi_remember_state and cfi_restore_state can be generated properly with epilogue CFI.
For examle, could the following case generated with cfi_remember_state and cfi_restore_state as GCC?

  extern void foo(void);
  void f(int *i) {
    if (*i == 0) {
      *i = 1;
      foo();
      return;
    } else {
      __builtin_printf("Hi");
      *i=0;
    }
  }


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143248/new/

https://reviews.llvm.org/D143248



More information about the llvm-commits mailing list