mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-25 23:00:15 +00:00
Update examples post OwningRewritePatternList change
This commit is contained in:
parent
2554b95db5
commit
113baa2b9f
@ -297,7 +297,7 @@ void ToyToAffineLoweringPass::runOnFunction() {
|
||||
|
||||
// Now that the conversion target has been defined, we just need to provide
|
||||
// the set of patterns that will lower the Toy operations.
|
||||
OwningRewritePatternList patterns;
|
||||
OwningRewritePatternList patterns(&getContext());
|
||||
patterns.insert<AddOpLowering, ConstantOpLowering, MulOpLowering,
|
||||
ReturnOpLowering, TransposeOpLowering>(&getContext());
|
||||
|
||||
|
@ -296,7 +296,7 @@ void ToyToAffineLoweringPass::runOnFunction() {
|
||||
|
||||
// Now that the conversion target has been defined, we just need to provide
|
||||
// the set of patterns that will lower the Toy operations.
|
||||
OwningRewritePatternList patterns;
|
||||
OwningRewritePatternList patterns(&getContext());
|
||||
patterns.insert<AddOpLowering, ConstantOpLowering, MulOpLowering,
|
||||
ReturnOpLowering, TransposeOpLowering>(&getContext());
|
||||
|
||||
|
@ -191,9 +191,9 @@ void ToyToLLVMLoweringPass::runOnOperation() {
|
||||
// lowerings. Transitive lowering, or A->B->C lowering, is when multiple
|
||||
// patterns must be applied to fully transform an illegal operation into a
|
||||
// set of legal ones.
|
||||
OwningRewritePatternList patterns;
|
||||
populateAffineToStdConversionPatterns(patterns, &getContext());
|
||||
populateLoopToStdConversionPatterns(patterns, &getContext());
|
||||
OwningRewritePatternList patterns(&getContext());
|
||||
populateAffineToStdConversionPatterns(patterns);
|
||||
populateLoopToStdConversionPatterns(patterns);
|
||||
populateStdToLLVMConversionPatterns(typeConverter, patterns);
|
||||
|
||||
// The only remaining operation to lower from the `toy` dialect, is the
|
||||
|
@ -297,7 +297,7 @@ void ToyToAffineLoweringPass::runOnFunction() {
|
||||
|
||||
// Now that the conversion target has been defined, we just need to provide
|
||||
// the set of patterns that will lower the Toy operations.
|
||||
OwningRewritePatternList patterns;
|
||||
OwningRewritePatternList patterns(&getContext());
|
||||
patterns.insert<AddOpLowering, ConstantOpLowering, MulOpLowering,
|
||||
ReturnOpLowering, TransposeOpLowering>(&getContext());
|
||||
|
||||
|
@ -191,9 +191,9 @@ void ToyToLLVMLoweringPass::runOnOperation() {
|
||||
// lowerings. Transitive lowering, or A->B->C lowering, is when multiple
|
||||
// patterns must be applied to fully transform an illegal operation into a
|
||||
// set of legal ones.
|
||||
OwningRewritePatternList patterns;
|
||||
populateAffineToStdConversionPatterns(patterns, &getContext());
|
||||
populateLoopToStdConversionPatterns(patterns, &getContext());
|
||||
OwningRewritePatternList patterns(&getContext());
|
||||
populateAffineToStdConversionPatterns(patterns);
|
||||
populateLoopToStdConversionPatterns(patterns);
|
||||
populateStdToLLVMConversionPatterns(typeConverter, patterns);
|
||||
|
||||
// The only remaining operation to lower from the `toy` dialect, is the
|
||||
|
Loading…
Reference in New Issue
Block a user