[PATCH] D136192: [AIX][PGO] WIP
Hubert Tong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 18 12:50:34 PDT 2022
hubert.reinterpretcast added inline comments.
================
Comment at: clang/lib/Driver/ToolChains/AIX.cpp:424
+ // initialization module to be linked in.
+ // On AIX, we need to keep the exact global who's constructor does the
+ // initialization in order for linking with -bcdtors:csect to work.
----------------
================
Comment at: clang/lib/Driver/ToolChains/AIX.cpp:427
+ if (needsProfileRT(Args))
+ CmdArgs.push_back(Args.MakeArgString(Twine("-u__llvm_register_runtime")));
+ ToolChain::addProfileRTLibs(Args, CmdArgs);
----------------
Don't need to use `MakeArgString` to persist a string literal.
================
Comment at: compiler-rt/lib/profile/InstrProfilingRuntime.cpp:16
-namespace {
-
class RegisterRuntime {
public:
----------------
The class still needs to be in an unnamed namespace for the constructor to not clash with a user-defined class with the same name.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136192/new/
https://reviews.llvm.org/D136192
More information about the llvm-commits
mailing list