[all-commits] [llvm/llvm-project] 7f85c5: [Clang][AIX][p]Enable -p Functionality
Michael Francis via All-commits
all-commits at lists.llvm.org
Thu Feb 9 08:14:05 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 7f85c560b43bd1b2ebf77cc443281b474b5e19c6
https://github.com/llvm/llvm-project/commit/7f85c560b43bd1b2ebf77cc443281b474b5e19c6
Author: Michael Francis <michaelfrancis at ibm.com>
Date: 2023-02-09 (Thu, 09 Feb 2023)
Changed paths:
M clang/include/clang/Driver/Options.td
M clang/lib/Driver/ToolChains/AIX.cpp
M clang/lib/Driver/ToolChains/Clang.cpp
M clang/test/Driver/aix-ld.c
Log Message:
-----------
[Clang][AIX][p]Enable -p Functionality
This patch enables `-p` functionality into Clang on AIX and Linux
To create parity with GCC.
The purpose of the `-p` flag is similar to that of `-pg`, but the
results are analyzed with the `prof` tool as opposed to the `gprof` tool.
More details can be found in this RFC post:
https://discourse.llvm.org/t/rfc-add-p-driver-support-to-clang/66013?u=francii
On AIX, compiling with `-p` links against `mcrt0.o`
and produces a mon.out file analyzed with the `prof` tool,
while `-pg` links against `gcrt0.o` and produces a `gmon.out`file
analyzed with the `gprof` tool. The differences are therefore
only a concern when linking, so calling `-p` will push `-pg` to cc1.
An AIX test for `-p` already exists, and I recently
another test was added here:
https://github.com/llvm/llvm-project/commit/dc9846ce988b9ddfcbc42cd462d5d94b634b3161
As such, there is no AIX test case attached to this patch.
Reviewed By: daltenty
Differential Revision: https://reviews.llvm.org/D137753
More information about the All-commits
mailing list