Changeset View
Changeset View
Standalone View
Standalone View
mlir/docs/Tutorials/Toy/Ch-6.md
Show First 20 Lines • Show All 99 Lines • ▼ Show 20 Lines | |||||
``` | ``` | ||||
### Full Lowering | ### Full Lowering | ||||
We want to completely lower to LLVM, so we use a `FullConversion`. This ensures | We want to completely lower to LLVM, so we use a `FullConversion`. This ensures | ||||
that only legal operations will remain after the conversion. | that only legal operations will remain after the conversion. | ||||
```c++ | ```c++ | ||||
mlir::ModuleOp module = getModule(); | mlir::ModuleOp module = getOperation(); | ||||
if (mlir::failed(mlir::applyFullConversion(module, target, patterns, | if (mlir::failed(mlir::applyFullConversion(module, target, patterns, | ||||
&typeConverter))) | &typeConverter))) | ||||
signalPassFailure(); | signalPassFailure(); | ||||
``` | ``` | ||||
Looking back at our current working example: | Looking back at our current working example: | ||||
```mlir | ```mlir | ||||
▲ Show 20 Lines • Show All 206 Lines • Show Last 20 Lines |