[PATCH] D113879: [Flang] Add the typeconversion to llvm for the FIR boxproc type

Eric Schweitz via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 15 17:39:49 PST 2021


schweitz added a comment.

`fir.boxproc` most likely needs some more work. I don't think it has been used, so it's more of a placeholder.

It is ultimately intended for creating thunks at runtime to implement function pointers. In Fortran, we can have "normal" function pointers and function pointers that must adjust to the calling context as the callee requires access to the host activation on the stack. The boxproc is an abstraction that lets one bind the function pointer and the pointer to the host's data.

I suspect that the intent was something like `ptr<struct<ptr<func>, ptr<host-data>>>`.

The codegen to build the thunk using the LLVM trampoline intrinsics (https://llvm.org/docs/LangRef.html#trampoline-intrinsics) should be completed here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D113879



More information about the llvm-commits mailing list