-
Notifications
You must be signed in to change notification settings - Fork 14.4k
[mlir][transform] Handle multiple library preloading passes. #69705
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
ingomueller-net
merged 6 commits into
llvm:main
from
ingomueller-net:transform-preload-multiple-new
Oct 25, 2023
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
b6a9868
Move module merging utils to dialect target. (NFC)
ingomueller-net d2fa236
Fix some unrelated issues found by @ftynse.
ingomueller-net 822d127
[mlir][transform] Handle multiple library preloading passes.
ingomueller-net 5c7302a
Fix issue found by @ftynse. Also make init function private.
ingomueller-net 8fda307
Revert one of the "unrelated fixes".
ingomueller-net 911eb7c
Fix test that broke after rebasing on top of #69329.
ingomueller-net File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
//===- Utils.h - Utils related to the transform dialect ---------*- C++ -*-===// | ||
// | ||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
// See https://llvm.org/LICENSE.txt for license information. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#ifndef MLIR_DIALECT_TRANSFORM_IR_UTILS_H | ||
#define MLIR_DIALECT_TRANSFORM_IR_UTILS_H | ||
|
||
namespace mlir { | ||
class InFlightDiagnostic; | ||
class Operation; | ||
template <typename> | ||
class OwningOpRef; | ||
|
||
namespace transform { | ||
namespace detail { | ||
|
||
/// Merge all symbols from `other` into `target`. Both ops need to implement the | ||
/// `SymbolTable` trait. Operations are moved from `other`, i.e., `other` may be | ||
/// modified by this function and might not verify after the function returns. | ||
/// Upon merging, private symbols may be renamed in order to avoid collisions in | ||
/// the result. Public symbols may not collide, with the exception of | ||
/// instances of `SymbolOpInterface`, where collisions are allowed if at least | ||
/// one of the two is external, in which case the other op preserved (or any one | ||
/// of the two if both are external). | ||
// TODO: Reconsider cloning individual ops rather than forcing users of the | ||
// function to clone (or move) `other` in order to improve efficiency. | ||
// This might primarily make sense if we can also prune the symbols that | ||
// are merged to a subset (such as those that are actually used). | ||
InFlightDiagnostic mergeSymbolsInto(Operation *target, | ||
OwningOpRef<Operation *> other); | ||
|
||
} // namespace detail | ||
} // namespace transform | ||
} // namespace mlir | ||
|
||
#endif // MLIR_DIALECT_TRANSFORM_IR_UTILS_H |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.