Skip to content
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

[AutoBump] Merge with fixes of fef3566a (Oct 01, needs downstream change) (6) #443

Open
wants to merge 2 commits into
base: bump_to_afc0557a
Choose a base branch
from

Conversation

mgehre-amd
Copy link
Collaborator

No description provided.

nikalra and others added 2 commits October 1, 2024 09:48
This change makes two (related) changes: 

First, it updates the tablegen option for `ListOption` to emit a
`SmallVector` instead of an `ArrayRef`. This brings `ListOption` more
inline with the traditional `Option`, where values are typically
provided using types that have storage. After this change, all options
should be fully owned by a Pass' `Options` object after it has been
fully constructed, unless the underlying type of the `Option` explicitly
indicates otherwise.

Second, it updates the generated constructors for Passes to consume
options by value instead of reference, and prefers moving options into
the pass itself. This should be more efficient for non-trivial options
objects, where the previous interface forced a copy to be materialized.
Now, at worst case the API materializes a copy (no worse than before);
at best-case, all options objects are moved into place. Ideally, we
could update the Pass constructor to take an r-value reference to the
Options object instead, but this approach will require numerous changes
to existing passes and their factory functions.

---------

Authored-by: Nikhil Kalra <nkalra@apple.com>
@mgehre-amd mgehre-amd changed the title [AutoBump] Merge with fixes of fef3566a (Oct 01) (6) [AutoBump] Merge with fixes of fef3566a (Oct 01, needs downstream change) (6) Jan 10, 2025
@mgehre-amd mgehre-amd requested a review from cferry-AMD January 10, 2025 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants