You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[NFC] Destructure AsyncFunctionPointer in getAsyncFunctionAndSize.
In irgen::getAsyncFunctionAndSize, an AsyncFunctionPointer is
destructured into one or both of (1) the underlying function pointer and
(2) the async context size.
Previously, the underlying function pointer was obtained via calling
FunctionPointer::getPointer, which function did the work of casting the
function pointer to an AsyncFunctionPointer, loading the relative
function address from it, and using that relative address to obtain the
function pointer. The size, then, if it was also obtained, was obtained
by again casting the function pointer to an AsyncFunctionPointer and
loading a field from it.
To avoid this repetition, here, the relevant portion of the body of
FunctionPointer::getPointer is inlined. Now only a single cast to
AsyncFunctionPointerPtrTy is required and one or both fields can be
loaded from it.
The real benefit of this change is as follows: when these function
pointers are authenticated as is required to dereference it on arm64e,
the authentication will only need to be performed once rather than once
for the function pointer and once for the size.
0 commit comments