[clang] [compiler-rt] [llvm] [AIX] Implement the ifunc attribute. (PR #153049)

Wael Yehia via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 30 19:25:15 PDT 2025


================
@@ -100,6 +102,13 @@ static cl::opt<bool> EnableSSPCanaryBitInTB(
     "aix-ssp-tb-bit", cl::init(false),
     cl::desc("Enable Passing SSP Canary info in Trackback on AIX"), cl::Hidden);
 
+static cl::list<std::string> IFuncLocal(
+    "ifunc-local",
----------------
w2yehia wrote:

@mandlebug please see latest version of TOCRestoreNeededForCallToImplementation.
I changed the walker to return a tristate: IsLocal (all are provably local), IsPreemptible (at least one is provably preemptible), and Unknown (a mix of provablty local and unknown structure).
I added a false-by-default flag `-mllvm -ifunc-local-if-proven` to control the bias. By default, the bias is local unless proven preemptible. I thought some users might not be comfortable with this as it might lead to silent bad behavior, so they can opt-out by using that flag.

Once we agree that this is an acceptable approach, I'll add a note under the ifunc attribute documentation.

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


More information about the llvm-commits mailing list