aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Support/ModRefTest.cpp
diff options
context:
space:
mode:
authorNikhil Kalra <nkalra@apple.com>2024-10-01 09:48:51 -0700
committerGitHub <noreply@github.com>2024-10-01 09:48:51 -0700
commitfef3566a25ff0e34fb87339ba5e13eca17cec00f (patch)
tree4dbc2ca836a571db31c543879740ead5b2a142ab /llvm/unittests/Support/ModRefTest.cpp
parentafc0557a04e333b67b96f8fce83b949ddb40fe2a (diff)
downloadllvm-fef3566a25ff0e34fb87339ba5e13eca17cec00f.zip
llvm-fef3566a25ff0e34fb87339ba5e13eca17cec00f.tar.gz
llvm-fef3566a25ff0e34fb87339ba5e13eca17cec00f.tar.bz2
[mlir] Pass Options ownership modifications (#110582)
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>
Diffstat (limited to 'llvm/unittests/Support/ModRefTest.cpp')
0 files changed, 0 insertions, 0 deletions