Aug 30 2023
Should there be a test to cover the new base class? In particular the constructor isn't called and the readNextRecord with a null Callback case.
Add unit test, address comments, cleanup unused includes in test.
Aug 29 2023
Aug 28 2023
Aug 25 2023
Aug 24 2023
Aug 11 2023
Aug 10 2023
Aug 9 2023
It would be great to reuse the existing corpus of splitting tests for ARM. They would cover basic functionality along with interactions with different flavours of FDO. Can you create a separate patch to move the existing tests in test/CodeGen/X86/machine-function-splitter.ll to test/CodeGen/Generic/machine-function-splitter.ll? Then we can add the triple and appropriate CHECKs for x86 and ARM.
Is there a specific reason to test MFS (on ARM) with MIR instead of .ll inputs? Only ~11% of the tests in test/CodeGen/AArch64 are in MIR, the rest are bitcode files. IMO bitcode is much easier to read, maintain and we can reuse most (all?) of the existing tests we have in machine-function-splitter.ll. So my preference would be to use bitcode unless there is a fundamental reason which blocks us from testing with bitcode.
Jul 27 2023
Can you also update llvm/test/Transforms/PGOProfile/Inputs/update_memprof_inputs.sh which generates the profraw today?
Jul 26 2023
Jul 20 2023
Can you add some numbers on the speedup to the patch description? Also how much is profile size reduction wall time as a fraction of the entire time?
Jul 12 2023
lgtm but you could also consider collapsing both BuildIds and BuildIdsSet into a single SetVector for conciseness.
Jul 11 2023
Jul 10 2023
lgtm, thanks for testing the various combinations of profiles passed to each option.
Jun 30 2023
lgtm, thanks for your patience with all the suggestions!
Jun 29 2023
Jun 28 2023
The change looks fine to me but is this patch missing the referenced unit test changes?:
Also use this new overload for existing unit test usecases.
Jun 27 2023
Fix capitalization in comment.
Jun 26 2023
Jun 22 2023
Hmm. I was using "cpu/event=0x85,umask=0x61/u" for i-TLB misses, which we got from https://download.01.org/perfmon, which has even been moved since then. Back in 2017 (when the algorithm was developed) we thought this is the "right" event to look at, but it might not be the case. Which one would you recommend to look at? I see this page has a good description.
There are a few different sets of events which count iTLB related behaviours. The misses that matter most are the ones that stall the pipeline. This is counted by FRONTEND_RETIRED.ITLB_MISS. https://github.com/intel/perfmon/blob/main/SKL/events/skylake_core.json#L5117-L5137
Jun 21 2023
Jun 9 2023
I'll remove the testcase from this CL
Actually I would prefer the foo4 based test case in this patch and in the same file too (test/CodeGen/X86/machine-function-splitter.ll). Also added a comment in the other patch D152577. Thanks!
Jun 7 2023
lgtm, looks safe to me since the context objects keep a StringRef.
May 26 2023
May 8 2023
LGTM, please wait a bit in case others have any concerns.
May 4 2023
May 3 2023
May 2 2023
lgtm, remaining comments are (mostly) cosmetic.
May 1 2023
Apr 28 2023
Should we update this too https://github.com/llvm/llvm-project/blob/main/llvm/test/tools/llvm-tli-checker/ps4-tli-check.yaml#L41
Apr 27 2023
Apr 26 2023
Looks good overall, still thinking if we can make assignFunctions less monolithic and easier to follow.
Apr 25 2023
Apr 20 2023
Apr 19 2023
Still need to look into assignFunctions but before I do I'm wondering if this patch can be split into two with applyImport and assignFunctions in separate patches. What do you think?
Apr 17 2023
Rebase, address comment.
Apr 14 2023
Thanks for the quick review!
Apr 13 2023
Remove unused include.
Can you leave an example of the warnings in the review discussion here for posterity? Thanks!
lgtm since I think this change is safe for existing profiles. @huangjd please confirm before submitting, thanks!
Apr 12 2023
Apr 10 2023
Apr 6 2023
Looks good overall, added a few comments which are mostly cosmetic.
Mar 21 2023
lgtm, I assume you will reduce these test cases too?
Rebase, remove var only used in assert.
Thanks for the review!