| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[mlir][cf] Add support for opaque pointers to ControlFlowToLLVM lowering Part of https://discourse.llvm.org/t/rfc-switching-the-llvm-dialect-and-dialect-lowerings-to-opaque-pointers/68179 This is a very simple patch since there is only one use of pointers types in cf.assert that has to be changed. Pointer types are conditionally created with element types and the GEP had to be adjusted to use the array type as base type. Differential Revision: https://reviews.llvm.org/D143583 | 3 年前 | |
[mlir] Only conditionally lower CF branching ops to LLVM Previously cf.br cf.cond_br and cf.switch always lowered to their LLVM equivalents. These ops are all ops that take in some values of given types and jump to other blocks with argument lists of the same types. If the types are not the same, a verification failure will later occur. This led to confusions, as everything works when func->llvm and cf->llvm lowering both occur because func->llvm updates the blocks and argument lists while cf->llvm updates the branching ops. Without func->llvm though, there will potentially be a type mismatch. This change now only lowers the CF ops if they will later pass verification. This is possible because the parent op and its blocks will be updated before the contained branching ops, so they can test their new operand types against the types of the blocks they jump to. Another plan was to have func->llvm only update the entry block signature and to allow cf->llvm to update all other blocks, but this had 2 problems: 1. This would create a FuncOp lowering in cf->llvm lowering which is awkward 2. This new pattern would only be applied if the containing FuncOp is marked invalid. This is infeasible with the shared LLVM type conversion/target infrastructure. See previous discussions at https://discourse.llvm.org/t/lowering-cf-to-llvm/63863 and https://github.com/llvm/llvm-project/issues/55301 Differential Revision: https://reviews.llvm.org/D130971 | 3 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 3 年前 | ||
| 3 年前 |