[llvm] [CodeGen][ARM64EC] Add support for hybrid_patchable attribute. (PR #92965)
Eli Friedman via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 10 17:26:54 PDT 2024
================
@@ -780,6 +889,17 @@ bool AArch64Arm64ECCallLowering::processFunction(
continue;
}
+ // Use mangled global alias for direct calls to patchable functions.
+ if (GlobalAlias *A =
+ dyn_cast_or_null<GlobalAlias>(CB->getCalledOperand())) {
+ auto I = FnsMap.find(A);
+ if (I != FnsMap.end()) {
+ CB->setCalledOperand(I->second);
----------------
efriedma-quic wrote:
It feels a little weird to rewrite all references to the function to aliases, then rewrite them again, but I guess it works.
https://github.com/llvm/llvm-project/pull/92965
More information about the llvm-commits
mailing list