inside-compiler / inside-compiler.github.io

blogs about Coimpiler & Virtual Machine
1 stars 3 forks source link

第4章(1):约束 | Inside Compiler #61

Open fiking opened 2 months ago

fiking commented 2 months ago

https://inside-compiler.github.io/2024/06/15/mlir-constraint/

正如2.3节提到的MLIR框架通过特质为操作、类型、属性提供约束,从而尽可能保证操作、属性、类型的正确性。接口借助于特质完成操作、属性、类型公共处理能力。本章主要介绍谓词、特质、接口的实现以及如何正确使用它们。 4.1 谓词谓词(Pred)是对操作和方言进行类型、属性等进行限制。由于谓词是在操作或者方言构建时使用,本书将其称为静态约束。在MLIR约束(Constraint)继承于谓词。约束对谓词增