moving runtime flag to the Logic
minor bug
[WIP] minor bug
[WIP] changes by clang-format
[WIP] merge conflicts
[WIP][UNROLLING] merge conflicts
Merge branch 'main' of github.com:Ali-Sed/llvm-project into main
Paths
| Differential D105173
[WIP][NFC] factor out unrolling decision logic Needs ReviewPublic Authored by Ali-Sed on Jun 30 2021, 12:04 AM.
Details
Diff Detail
Event TimelineComment Actions Could you update the commit message (both git and here) to say what the patch accomplishes, i.e. "[NFC] factor out unrolling decision logic" or something like that - nfc because it should just be a refactoring. The message can clarify why - e.g. so it may simplify exploring alternative decision-making mechanisms.
Ali-Sed retitled this revision from Initial refactoring to [WIP][NFC] factor out unrolling decision logic.Jul 5 2021, 6:47 PM Comment Actions The latest revision appears to be missing most of the changes. You may want to squash several commits together in git, and make sure the commit message properly explains the reasoning behind the patch. Do you intend this to go into LLVM, or are you still experimenting at this point? It may be best to make sure what you come up with will have practical use before making a lot of changes in llvm itself. My understanding is that this code is (overly) complex but it is the order it is for deliberate reasons. All the existing tests have to keep passing, if they are not already. I would consider runtime unrolling to be the most interesting part of machine learning loop unroll factors, at least on many cpu's. Comment Actions
Thanks a lot for your feedback. I've been decoupling the logic, that unrolling pass uses, from the rest of it. So in a near future, I'll be able to replace it with a learning model. For now, full unrolling and partial unrolling are the main goals. But, yes definitely! the logic behind the runtime unrolling could be a very interesting choice to be replaced with a learning model too. Ali-Sed added a child revision: D106001: [NFC] factor out unrolling decision logic.Jul 14 2021, 10:14 AM
Revision Contents
Diff 356586 llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp
|
use verb names for functions, e.g. shouldUnroll. That also explains what the return means.
Also add a comment above it, like computeUnrollCount has.
does MaxTripCount need to be passed by-ref?
could the return of this function be rather a more complex object, where the TripCount and TripMultiple were returned - I haven't looked yet at how it's used, is it that the caller proposes such values, and this adjusts them?