[llvm] [ThinLTO]Mark referencers of local ifunc not eligible for import (PR #92431)
Mingming Liu via llvm-commits
llvm-commits at lists.llvm.org
Thu May 16 11:06:59 PDT 2024
================
@@ -88,16 +88,22 @@ extern cl::opt<unsigned> MaxNumVTableAnnotations;
// Walk through the operands of a given User via worklist iteration and populate
// the set of GlobalValue references encountered. Invoked either on an
// Instruction or a GlobalVariable (which walks its initializer).
-// Return true if any of the operands contains blockaddress. This is important
-// to know when computing summary for global var, because if global variable
-// references basic block address we can't import it separately from function
-// containing that basic block. For simplicity we currently don't import such
-// global vars at all. When importing function we aren't interested if any
-// instruction in it takes an address of any basic block, because instruction
-// can only take an address of basic block located in the same function.
+//
+// Return true if any user references a block address, and sets
+// `RefLocalLinkageIFunc` to true if the analyzed value references local ifunc.
+// - If a local-linkage ifunc is referenced, the analyzed value is not eligible
+// for import.
+// - Additionally, global vars will be marked as not eligible to import if they
+// references references basic block address, because we can't import it
----------------
minglotus-6 wrote:
done.
https://github.com/llvm/llvm-project/pull/92431
More information about the llvm-commits
mailing list