In D127765#3814900, @fhahn wrote:Hmm, aren't there other places in the code that rely on instructions being hoisted out by LICM? Unless I am mis-remembering, It's not clear to me if/why freeze should be treated in a special way.
Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
- Queries
- All Stories
- Search
- Advanced Search
- Transactions
- Transaction Logs
Feed Advanced Search
Advanced Search
Advanced Search
Sep 26 2022
Sep 26 2022
Sep 6 2022
Sep 6 2022
drcut committed rGfb45f3c9486f: [SimpleLoopUnswitch] Skip non-trivial unswitching of cold functions (authored by drcut).
[SimpleLoopUnswitch] Skip non-trivial unswitching of cold functions
drcut updated the diff for D133275: [SimpleLoopUnswitch] Skip non-trivial unswitching of cold functions.
Use opt to remove useless profiling data
drcut added a comment to D133275: [SimpleLoopUnswitch] Skip non-trivial unswitching of cold functions.
@alexgatea Would you please also evaluate this patch on SPEC to see whether there are other regressions? Thanks
Sep 4 2022
Sep 4 2022
drcut requested review of D133275: [SimpleLoopUnswitch] Skip non-trivial unswitching of cold functions.
drcut committed rG07341e3b3780: [test] pre-submission for the following SimpleLoopUnswitch update (authored by drcut).
[test] pre-submission for the following SimpleLoopUnswitch update
drcut updated the diff for D129599: [SimpleLoopUnswitch] Skip non-trivial unswitching of cold loops.
revert to previous revision that has been merged into main branch
Sorry for the mistake, I will keep this revision open and make it related to the update revision for the regression.
I will create a new revision for this patch
Aug 29 2022
Aug 29 2022
drcut updated the diff for D129599: [SimpleLoopUnswitch] Skip non-trivial unswitching of cold loops.
Avoid applying non-trivial unswitching in cold Function. Compared with previous PGO solution, this version will apply non-trivial unswitching on cold loops in hot functions.
Aug 27 2022
Aug 27 2022
@alexgatea please try whether the new revision could solve your problem. Thanks
drcut updated the diff for D129599: [SimpleLoopUnswitch] Skip non-trivial unswitching of cold loops.
As suggested by other users, we need to make the skip check more restrict to avoid performance degradation.
Aug 25 2022
Aug 25 2022
@alexgatea Thanks for the feedback.
isColdBlock should be global. One example is in (https://llvm.org/doxygen/ProfileSummaryInfo_8cpp_source.html#l00142), which uses isColdBlock to check whether a function is cold or not. So I assume the issue is the loop is non-cold in real case, but was concerned as cold in the profile data. I kindly suggest updating the profile data to see if there is still any degradation.
Please correct me if I am wrong. Thanks
Aug 8 2022
Aug 8 2022
drcut committed rGf756f06cc471: [SimpleLoopUnswitch] Skip non-trivial unswitching of cold loops (authored by drcut).
[SimpleLoopUnswitch] Skip non-trivial unswitching of cold loops
drcut retitled D129599: [SimpleLoopUnswitch] Skip non-trivial unswitching of cold loops from Apply PGO on SimpleLoopUnswitch to [SimpleLoopUnswitch] Skip non-trivial unswitching of cold loops.
This patch implements SimpleLoopUnswitch using FuncPass, which can be used to replace the LoopPass implementation currently used in the optimization pipeline.
This patch has been verified and can be re-opened once we find using FuncPass for SLU is necessary/beneficial.
Aug 5 2022
Aug 5 2022
drcut updated the diff for D129599: [SimpleLoopUnswitch] Skip non-trivial unswitching of cold loops.
[test] Update PGO SLU test
drcut committed rGb5244fb71cae: [test][SimpleLoopUnswitch] Precommit test for D129599 (authored by drcut).
[test][SimpleLoopUnswitch] Precommit test for D129599
drcut updated the diff for D129599: [SimpleLoopUnswitch] Skip non-trivial unswitching of cold loops.
[test][SimpleLoopUnswitch] Precommit test for D129599
Aug 4 2022
Aug 4 2022
drcut updated the diff for D129599: [SimpleLoopUnswitch] Skip non-trivial unswitching of cold loops.
[llvm] Change test file for PGO on SLU
drcut updated the diff for D129599: [SimpleLoopUnswitch] Skip non-trivial unswitching of cold loops.
[llvm] Implement PGO for SLU
Using PGO for SLU to avoid non-trivial unswitch code on code loops, which will increase the binary code size without gain much benefit.
Jul 27 2022
Jul 27 2022
drcut updated the summary of D130672: [llvm] Extend the CaptureTracking to handle constantExprs that read global variables.
Jul 20 2022
Jul 20 2022
drcut committed rG2b98b8e8fba1: fix bug for useless malloc elimination in CodeGenPrepare (authored by drcut).
fix bug for useless malloc elimination in CodeGenPrepare
Jul 19 2022
Jul 19 2022
In D130126#3663981, @nikic wrote:Please put the test in llvm/test/Transforms/CodeGenPrepare instead and use update_test_checks.py. Omit the target triple if possible, which it likely is.
Reformat the test file with update_test_checks.py
drcut added a reviewer for D130126: fix bug for useless malloc elimination in CodeGenPrepare: aeubanks.
Jul 12 2022
Jul 12 2022
drcut added reviewers for D129599: [SimpleLoopUnswitch] Skip non-trivial unswitching of cold loops: aeubanks, asbirlea.
Jun 21 2022
Jun 21 2022
@bcahoon This revision is based on your previous implementation (https://reviews.llvm.org/D109762). In the parent revision(https://reviews.llvm.org/D127547) we use FuncPass to re-implement non-trivial LoopUnswitch, thus, we do not invoke DivergenceAnalysis for each loop. Would you please have are look for whether these modifications (implement non-trivial LoopUnswitch with FuncPass and integrate DivergenceAnalysis in the new FuncPass) work on your test cases? Thanks
Jun 16 2022
Jun 16 2022
Jun 14 2022
Jun 14 2022
drcut added reviewers for D127765: modify the insertion of freeze instructions for SLU pass: aeubanks, asbirlea.
Fix bug for hoisting freeze instruction
Jun 13 2022
Jun 13 2022
Jun 10 2022
Jun 10 2022
drcut added reviewers for D127547: Add FuncPass Implementation for non-trivial LoopUnswitching: asbirlea, aeubanks.
Jun 9 2022
Jun 9 2022
May 17 2022
May 17 2022
fix typo error in DivergenceAnalysis.h
drcut retitled D125808: fix typo error in DivergenceAnalysis.h from fix typo to fix typo error in DivergenceAnalysis.h.