llvm-project/mlir/test
Michal Terepeta 54c9984207 [mlir][Python] Fix generation of accessors for Optional
Previously, in case there was only one `Optional` operand/result within
the list, we would always return `None` from the accessor, e.g., for a
single optional result we would generate:

```
return self.operation.results[0] if len(self.operation.results) > 1 else None
```

But what we really want is to return `None` only if the length of
`results` is smaller than the total number of element groups (i.e.,
the optional operand/result is in fact missing).

This commit also renames a few local variables in the generator to make
the distinction between `isVariadic()` and `isVariableLength()` a bit
more clear.

Reviewed By: ftynse

Differential Revision: https://reviews.llvm.org/D113855
2021-11-18 09:42:57 +01:00
..
Analysis [mlir] Make topologicalSort iterative and consider op regions 2021-11-10 10:05:01 -08:00
CAPI [mlir] Add MLIR-C dylib. 2021-11-11 22:58:13 -08:00
Conversion [MLIR][LLVM] Permit integer types in switch other than i32 2021-11-16 12:00:37 -05:00
Dialect [mlir][linalg][bufferize] Fix bufferize bug where non-tensor ops are not skipped 2021-11-18 16:20:22 +09:00
Examples Re-apply "[mlir] Allow out-of-tree python building from installed MLIR." 2021-11-14 20:31:34 -08:00
IR [mlir][Vector] First step for 0D vector type 2021-11-17 14:58:24 +00:00
Integration [mlir][sparse] refine lexicographic insertion to any tensor 2021-11-17 18:08:42 -08:00
Interfaces [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00:00
Pass [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00:00
Rewrite [mlir][PDL] Add support for variadic operands and results in the PDL byte code 2021-03-16 13:20:19 -07:00
Target [MLIR][LLVM] Permit integer types in switch other than i32 2021-11-16 12:00:37 -05:00
Transforms [mlir](arithmetic) Add ceildivui to the arithmetic dialect 2021-11-11 01:49:14 +00:00
Unit Revert "Attempt to disable MLIR JIT tests on PowerPC to unbreak the bot" 2021-06-29 18:03:23 -05:00
lib [mlir] Convert NamedAttribute to be a class 2021-11-18 05:39:29 +00:00
mlir-cpu-runner [MLIR][Math] Add erf to math dialect 2021-10-25 18:30:17 +00:00
mlir-linalg-ods-gen [mlir] Refactor ElementsAttr's value access API 2021-11-09 00:15:08 +00:00
mlir-lsp-server [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00:00
mlir-opt [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00:00
mlir-reduce [mlir-reduce] Reducer refactor. 2021-06-02 07:45:00 +08:00
mlir-spirv-cpu-runner [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00:00
mlir-tblgen [mlir][Python] Fix generation of accessors for Optional 2021-11-18 09:42:57 +01:00
mlir-translate [mlir] Print the correct tool name in mlirTranslateMain 2021-01-05 19:17:01 -08:00
mlir-vulkan-runner [MLIR] Replace std ops with arith dialect ops 2021-10-13 03:07:03 +00:00
python [mlir][Python] Fix generation of accessors for Optional 2021-11-18 09:42:57 +01:00
APITest.h
CMakeLists.txt [mlir][python] Segment MLIR Python test dialect to avoid testonly dependency. 2021-10-26 18:47:36 +00:00
lit.cfg.py [mlir] [test] Add missing tool substitutions 2021-10-03 21:28:13 +02:00
lit.site.cfg.py.in Re-apply "[mlir] Allow out-of-tree python building from installed MLIR." 2021-11-14 20:31:34 -08:00