[llvm] [IR] Define empty and malformed !callees semantics (PR #221550)

Shilei Tian via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 8 07:46:30 PDT 2026


================
@@ -12372,14 +12372,13 @@ struct AAIndirectCallInfoCallSite : public AAIndirectCallInfo {
 
   /// See AbstractAttribute::initialize(...).
   void initialize(Attributor &A) override {
-    auto *MD = getCtxI()->getMetadata(LLVMContext::MD_callees);
-    if (!MD && !A.isClosedWorldModule())
+    SmallVector<Function *, 4> Callees;
+    HasCalleesMetadata = cast<CallBase>(getCtxI())->getCalleesMetadata(Callees);
+    if (!HasCalleesMetadata && !A.isClosedWorldModule())
----------------
shiltian wrote:

Technically, with the change, even if a module is not closed world, if `getCalleesMetadata` returns true, it means that particular call site has an exhaustive list of potential callees right?

https://github.com/llvm/llvm-project/pull/221550


More information about the llvm-commits mailing list