[PATCH] D136192: [PGO][AIX] Improve dummy var retention and allow -bcdtors:csect linking.
Petr Hosek via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Oct 23 14:49:30 PDT 2022
phosek added inline comments.
================
Comment at: compiler-rt/lib/profile/InstrProfilingPlatformLinux.c:265-267
+COMPILER_RT_VISIBILITY
+void *__llvm_profile_keep[] = {(void *)&dummy_cnts, (void *)&dummy_data,
+ (void *)&dummy_name, (void *)&dummy_vnds};
----------------
Does AIX linker support the `retain` attribute? That would be a cleaner solution.
================
Comment at: compiler-rt/lib/profile/InstrProfilingRuntime.cpp:20-22
COMPILER_RT_VISIBILITY int INSTR_PROF_PROFILE_RUNTIME_VAR;
-}
+static int Registration = RegisterRuntime();
----------------
Is it possible to reuse the runtime hook variable on other platforms as well? I'd really like to avoid introducing another variable.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136192/new/
https://reviews.llvm.org/D136192
More information about the cfe-commits
mailing list