-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[PassBuilder] VectorizerEnd Extension Points #123494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PassBuilder] VectorizerEnd Extension Points #123494
Conversation
Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it is probably because you do not have write permissions for the repository. In which case you can instead tag reviewers by name in a comment by using If you have received no comments on your PR for a week, you can request a review by "ping"ing the PR by adding a comment “Ping”. The common courtesy "ping" rate is once a week. Please remember that you are asking for valuable time from other developers. If you have further questions, they may be answered by the LLVM GitHub User Guide. You can also ask questions in a comment on this PR, on the LLVM Discord or on the forums. |
@mshockwave Thanks again for guiding me through my first pull request! |
the patch looks good, but is this actually going to get used? if so the description should be updated with that info. otherwise I'd rather not add unused code |
This extension point was inspired by #91796 where we need to run a Pass right after the vectorizers. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good, lgtm with nits
please update the description with the intended usage
grepping for passes-ep-vectorizer-start
shows that llvm/test/Other/new-pm-O0-ep-callbacks.ll and llvm/test/Other/pass-pipeline-parsing.ll need tests
Added an extension point after vectorizer passes in the PassBuilder. Additionally, added extension points before and after vectorizer passes in `buildLTODefaultPipeline`. Credit goes to @mshockwave for guiding me through my first LLVM contribution (and my first open source contribution in general!) :) - Implemented `registerVectorizerEndEPCallback` - Implemented `invokeVectorizerEndEPCallbacks` - Added `VectorizerEndEPCallbacks` SmallVector - Added a command line option `passes-ep-vectorizer-end` to `NewPMDriver.cpp` - `buildModuleOptimizationPipeline` now calls `invokeVectorizerEndEPCallbacks` - `buildO0DefaultPipeline` now calls `invokeVectorizerEndEPCallbacks` - `buildLTODefaultPipeline` now calls BOTH `invokeVectorizerStartEPCallbacks` and `invokeVectorizerEndEPCallbacks` - Added LIT tests to `new-pm-defaults.ll`, `new-pm-lto-defaults.ll`, `new-pm-O0-ep-callbacks.ll`, and `pass-pipeline-parsing.ll` - Renamed `CHECK-EP-Peephole` to `CHECK-EP-PEEPHOLE` in `new-pm-lto-defaults.ll` for consistency.
14bf48e
to
e901492
Compare
can you put the intended usage for this in the PR description (first comment in this PR)? then lgtm and I'll merge |
I believe I did, at the bottom of my list. Does that description suffice or should I aim for something more specific? |
Wait, I don't have the description in the commit message. Should I put it there as well? |
sorry, I meant a specific example of something that's going to use it, like #91796. Just the first comment in the PR is enough |
thanks! |
Ahhhh this is so exciting! My first contribution, merged! Thank YOU for being so patient :) |
@axelcool1234 Congratulations on having your first Pull Request (PR) merged into the LLVM Project! Your changes will be combined with recent changes from other authors, then tested by our build bots. If there is a problem with a build, you may receive a report in an email or a comment on this PR. Please check whether problems have been caused by your change specifically, as the builds can include changes from many authors. It is not uncommon for your change to be included in a build that fails due to someone else's changes, or infrastructure issues. How to do this, and the rest of the post-merge process, is covered in detail here. If your change does cause a problem, it may be reverted, or you can revert it yourself. This is a normal part of LLVM development. You can fix your changes and open a new PR to merge them again. If you don't get any reports, no action is required from you. Your changes are working as expected, well done! |
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/52/builds/5649 Here is the relevant piece of the build log for the reference
|
Interesting. How come my build failed while the previous commit and the commit after mine had (seemingly) the same problems in "annotate" but as warnings? I'm also failing the asan check in stage 2, but the commit after mine isn't failing it. @mshockwave I'm checking out the LLVM buildbot. |
there is still a lot of work to do (and being done) on LLVM testing infra, these failures look unrelated so I wouldn't worry about them |
I see, thanks! |
Don't worry about it, the failure looks irrelevant. LLVM's post-commit buildbot is usually pretty noisy. |
Added an extension point after vectorizer passes in the PassBuilder. Additionally, added extension points before and after vectorizer passes in
buildLTODefaultPipeline
. Credit goes to @mshockwave for guiding me through my first LLVM contribution (and my first open source contribution in general!) :)registerVectorizerEndEPCallback
invokeVectorizerEndEPCallbacks
VectorizerEndEPCallbacks
SmallVectorpasses-ep-vectorizer-end
toNewPMDriver.cpp
buildModuleOptimizationPipeline
now callsinvokeVectorizerEndEPCallbacks
buildO0DefaultPipeline
now callsinvokeVectorizerEndEPCallbacks
buildLTODefaultPipeline
now calls BOTHinvokeVectorizerStartEPCallbacks
andinvokeVectorizerEndEPCallbacks
new-pm-defaults.ll
,new-pm-lto-defaults.ll
,new-pm-O0-ep-callbacks.ll
, andpass-pipeline-parsing.ll
CHECK-EP-Peephole
toCHECK-EP-PEEPHOLE
innew-pm-lto-defaults.ll
for consistency.This code is intended for developers that wish to implement and run custom passes after the vectorizer passes in the PassBuilder pipeline. For example, in #91796, a pass was created that changes the induction variables of vectorized code. This is right after the vectorization passes.