[all-commits] [llvm/llvm-project] addd07: [AIX][PowerPC][PGO] Generate .ref for some PGO sec...
w2yehia via All-commits
all-commits at lists.llvm.org
Sat Feb 5 04:04:54 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: addd0733250af38da0ff5503d65250156a9c179a
https://github.com/llvm/llvm-project/commit/addd0733250af38da0ff5503d65250156a9c179a
Author: Wael Yehia <wyehia at ca.ibm.com>
Date: 2022-02-05 (Sat, 05 Feb 2022)
Changed paths:
M llvm/include/llvm/MC/MCContext.h
M llvm/include/llvm/MC/MCStreamer.h
M llvm/include/llvm/MC/MCXCOFFStreamer.h
M llvm/lib/MC/MCAsmStreamer.cpp
M llvm/lib/MC/MCContext.cpp
M llvm/lib/MC/MCStreamer.cpp
M llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
A llvm/test/CodeGen/PowerPC/pgo-ref-directive.ll
Log Message:
-----------
[AIX][PowerPC][PGO] Generate .ref for some PGO sections
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.
Reviewed By: sfertile, daltenty
Differential Revision: https://reviews.llvm.org/D116607
More information about the All-commits
mailing list