[PATCH] D116607: [AIX][PowerPC][PGO] Generate .ref for some PGO sections
wael yehia via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 4 10:52:16 PST 2022
w2yehia created this revision.
Herald added subscribers: wenlei, shchenz, kbarton, hiraditya, nemanjai.
w2yehia requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
For PGO on AIX, when we switch to the linux-style PGO variable access (via _start and _stop labels), we need the compiler to generate a .ref assembly for each of the three csects:
__llvm_prf_data[RW]
__llvm_prf_names[RO]
__llvm_prf_vnds[RW]
We insert the .ref inside the __llvm_prf_cnts[RW] csect so that if it's live then the 3 csects are live.
For example, for a testcase with at least one function definition, when compiled with -fprofile-generate we should generate:
.csect __llvm_prf_cnts[RW],3
.ref __llvm_prf_data[RW] <<============ needs to be inserted
.ref __llvm_prf_names[RO] <<===========
the __llvm_prf_vnds is not always present, so we reference it only when it's present.
https://reviews.llvm.org/D116607
Files:
llvm/include/llvm/MC/MCContext.h
llvm/include/llvm/MC/MCStreamer.h
llvm/include/llvm/MC/MCXCOFFStreamer.h
llvm/lib/MC/MCAsmStreamer.cpp
llvm/lib/MC/MCContext.cpp
llvm/lib/MC/MCStreamer.cpp
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
llvm/test/CodeGen/PowerPC/pgo-ref-directive.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116607.397338.patch
Type: text/x-patch
Size: 9834 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220104/322a810e/attachment.bin>
More information about the llvm-commits
mailing list