[llvm] [llvm][GlobalOpt] Optimize statically resolvable IFuncs (PR #80606)

Jon Roelofs via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 6 08:27:15 PST 2024


================
@@ -2404,6 +2406,57 @@ static bool OptimizeEmptyGlobalCXXDtors(Function *CXAAtExitFn) {
   return Changed;
 }
 
+static Function *hasSideeffectFreeStaticResolution(GlobalIFunc &IF) {
+  Function *Resolver = IF.getResolverFunction();
+  if (!Resolver)
+    return nullptr;
+
+  if (Resolver->isInterposable())
----------------
jroelofs wrote:

oh, yeah, you're right.

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


More information about the llvm-commits mailing list