From 98eb8abff6ad5c2e2f95fd1189b35a24f2800b32 Mon Sep 17 00:00:00 2001 From: Arnold Schwaighofer Date: Thu, 29 Jun 2023 08:07:11 -0700 Subject: Add a type_checked_load_relative to support relative function pointer tables This adds a type_checked_load_relative intrinsic whose semantics it is to load a relative function pointer. A relative function pointer is a pointer to a 32bit value that when added to its address yields the address of the function. Differential Revision: https://reviews.llvm.org/D143204 --- llvm/lib/Analysis/ModuleSummaryAnalysis.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'llvm/lib/Analysis/ModuleSummaryAnalysis.cpp') diff --git a/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp b/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp index 3830edc..fd125ac 100644 --- a/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp +++ b/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp @@ -198,6 +198,7 @@ static void addIntrinsicToSummary( break; } + case Intrinsic::type_checked_load_relative: case Intrinsic::type_checked_load: { auto *TypeMDVal = cast(CI->getArgOperand(2)); auto *TypeId = dyn_cast(TypeMDVal->getMetadata()); -- cgit v1.1