[llvm] [llvm][GlobalOpt] Optimize statically resolvable IFuncs (PR #80606)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 5 05:30:24 PST 2024
================
@@ -2404,6 +2405,42 @@ static bool OptimizeEmptyGlobalCXXDtors(Function *CXAAtExitFn) {
return Changed;
}
+static Function *hasSideeffectFreeStaticResolution(GlobalIFunc &IF) {
+ Function *Resolver = IF.getResolverFunction();
+ if (!Resolver)
+ return nullptr;
----------------
nikic wrote:
You need to guard against interposable linkage here, e.g. `weak`. Unless this is forbidden for ifuncs?
https://github.com/llvm/llvm-project/pull/80606
More information about the llvm-commits
mailing list