mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-27 15:14:31 +00:00
[mlir][Pattern] Add a new FrozenRewritePatternList class
This class represents a rewrite pattern list that has been frozen, and thus immutable. This replaces the uses of OwningRewritePatternList in pattern driver related API, such as dialect conversion. When PDL becomes more prevalent, this API will allow for optimizing a set of patterns once without the need to do this per run of a pass. Differential Revision: https://reviews.llvm.org/D89104
This commit is contained in:
1 parent
b6eb26fd0e
commit
3fffffa882
72 files changed
+254
-170
No files matched your search
@@ -1619,7 +1619,7 @@ void LowerVectorToLLVMPass::runOnOperation() {
|
||||
populateVectorToVectorCanonicalizationPatterns(patterns, &getContext());
|
||||
populateVectorSlicesLoweringPatterns(patterns, &getContext());
|
||||
populateVectorContractLoweringPatterns(patterns, &getContext());
|
||||
applyPatternsAndFoldGreedily(getOperation(), patterns);
|
||||
applyPatternsAndFoldGreedily(getOperation(), std::move(patterns));
|
||||
}
|
||||
|
||||
// Convert to the LLVM IR dialect.
|
||||
@@ -1632,7 +1632,8 @@ void LowerVectorToLLVMPass::runOnOperation() {
|
||||
populateStdToLLVMConversionPatterns(converter, patterns);
|
||||
|
||||
LLVMConversionTarget target(getContext());
|
||||
if (failed(applyPartialConversion(getOperation(), target, patterns)))
|
||||
if (failed(
|
||||
applyPartialConversion(getOperation(), target, std::move(patterns))))
|
||||
signalPassFailure();
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user