- User Since
- Dec 30 2016, 3:24 PM (233 w, 3 d)
Mention the one-time exception for .profraw compatibility
Not keeping version compatibility for the raw profile format would actually make my life easier.
But I was CCed on the Linux kernel news https://www.phoronix.com/scan.php?page=news_item&px=Clang-PGO-For-Linux-Next so I paid additional care in this patch.
Add more comments to InstrProfilingMerge.c
stack size -> stack frame size
Agree that a function attribute is more appropriate considering the LTO behavior.
(This was why I suggested we waited a bit on GCC's response...)
Sat, Jun 19
Fri, Jun 18
make win64 work
Thanks for review:) I feel that I understand value profiling better now.
minor adjustment to comment and test
switch to the NS==0 approach after seeing See my prior comment -- your previous revision is sound and LGTM. If we go with this version, we do need to examine whether static allocation is on or not. Sorry for the trouble.
(did not notice in my previous test update...)
fix condition and improve test
Use ValuesVar instead of NS
improve a comment
I think the main problem is when the value is negative. How to represent it?
Signed-off-by: Nick Desaulniers <email@example.com>
@marxin FYI the GNU-style function attribute no_profile
The main challenge is storing the offset to the profile data without using dynamic relocations. This is complicated by the fact that we use comdat sections within the llvm_mipraw section and that ELF does not seem to directly support section relative addresses. The solution is to use PC relative relocations. start___llvm_mipraw-.Lref gives us the PC relative offset to the start of the raw section and _Z3foov$RAW-.Lref gives us the offset to the profile data for this function relative to the same PC. After we extract the map section, we can subtract these to get the value we want, the section relative raw profile data offset.
(_Z3foov$RAW-.Lref) - (start_llvm_mipraw-.Lref) = _Z3foov$RAW - start_llvm_mipraw
Some email conversations are not on Phabricator. I record a copy here so that people who are not subscribed can have a full view
Is dynamic linking fully functional?
A stage-2 -DLLVM_BUILD_INSTRMENTED=IR clang is 4.2% smaller (1-169620032/177066968) with this patch.
I need to add a test case, but this is the sketch.
Thu, Jun 17
I think the previous Instrumentation/InstrProfiling.cpp changes can be considered stable now. So, ping:)
Should no_profile specify the inlining behavior? Though no_sanitize_* don't specify that, either.
Looks great! One nit
Wed, Jun 16
I think people's main question is what distinguishing features make MachineFunction instrumentation appealing.
riscv64-linux-gnu-as -march=rv64gc a.s does use 2-byte alignment, so I think this may be fine.
(If the idea is to do the test in a merged patch.)
Sorry for being late on reviews.
After modifying the commit description, use arc diff --verbatim --head=HEAD 'HEAD^' to update the Phabricator subject/summary.
Also, have you checked how symlinks/hardlinks behave? link.exe uses sys::fs::getUniqueID.
You may need a test using -force_load for different archives.