Skip to content

[SandboxVec][Doc] Add documentation for the Sandbox Vectorizer #133504

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

Merged
merged 2 commits into from
Mar 29, 2025

Conversation

vporpo
Copy link
Contributor

@vporpo vporpo commented Mar 28, 2025

No description provided.

Copy link
Collaborator

@slackito slackito left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just some minor comments.

```
┌────────────────────────────────── Sandbox Vectorizer LLVM Function Pass ─────────────────────────────┐
│ │
│ ┌───────┐ ┌────────────────────────── sanboxir::Function Pass Manager ─────────────────────────────┐ │
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: "sanboxir"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

| `tr-accept` | TransactionAlwaysAccept.h | Region | Unconditionally accepts the IR state |
| `tr-revert` | TransactionAlwaysRevert.h | Region | Unconditionally rejects the IR state |
| `tr-accept-or-revert` | TransactionAcceptOrRevert.h | Region | Checks cost model and either accepts or reverts the IR |
| `null` | NullPass.h | Region | A test pass that prints the region instructions |
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The null pass doesn't print anything, that would be the new print-region pass in #131019

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Fixed.
I also added one line for #131019


One of the great things about the Sandbox Vectorizer is that it allows you to test each internal pass in isolation with lit-tests.

Testing Function passes are straightforward, just run `FUNCTION_PASS` in isolation with `-sbvec-passes`, like so:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be "Testing Function passes is straightforward".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

Copy link
Contributor Author

@vporpo vporpo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed comments and rebased.

```
┌────────────────────────────────── Sandbox Vectorizer LLVM Function Pass ─────────────────────────────┐
│ │
│ ┌───────┐ ┌────────────────────────── sanboxir::Function Pass Manager ─────────────────────────────┐ │
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

| `tr-accept` | TransactionAlwaysAccept.h | Region | Unconditionally accepts the IR state |
| `tr-revert` | TransactionAlwaysRevert.h | Region | Unconditionally rejects the IR state |
| `tr-accept-or-revert` | TransactionAcceptOrRevert.h | Region | Checks cost model and either accepts or reverts the IR |
| `null` | NullPass.h | Region | A test pass that prints the region instructions |
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Fixed.
I also added one line for #131019


One of the great things about the Sandbox Vectorizer is that it allows you to test each internal pass in isolation with lit-tests.

Testing Function passes are straightforward, just run `FUNCTION_PASS` in isolation with `-sbvec-passes`, like so:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@vporpo vporpo merged commit 31fe0d2 into llvm:main Mar 29, 2025
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants