[all-commits] [llvm/llvm-project] fd9613: [MLIR] Rename Shape dialect's `join` to `meet`.

Alexandre Rames via All-commits all-commits at lists.llvm.org
Wed Oct 6 09:41:47 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fd9613324d305f036d8177469e4f1d0ed521b3a7
      https://github.com/llvm/llvm-project/commit/fd9613324d305f036d8177469e4f1d0ed521b3a7
  Author: Alexandre Rames <arames at apple.com>
  Date:   2021-10-06 (Wed, 06 Oct 2021)

  Changed paths:
    M mlir/include/mlir/Dialect/Shape/IR/ShapeOps.td
    M mlir/lib/Dialect/Shape/IR/Shape.cpp
    M mlir/test/Dialect/Shape/ops.mlir

  Log Message:
  -----------
  [MLIR] Rename Shape dialect's `join` to `meet`.

For the type lattice, we (now) use the "less specialized or equal" partial
order, leading to the bottom representing the empty set, and the top
representing any type.

This naming is more in line with the generally used conventions, where the top
of the lattice is the full set, and the bottom of the lattice is the empty set.
A typical example is the powerset of a finite set: generally, meet would be the
intersection, and join would be the union.

```
top:  {a,b,c}
     /   |   \
 {a,b} {a,c} {b,c}
   |  X     X  |
   {a} { b } {c}
      \  |  /
bottom: { }
```

This is in line with the examined lattice representations in LLVM:
* lattice for `BitTracker::BitValue` in `Hexagon/BitTracker.h`
* lattice for constant propagation in `HexagonConstPropagation.cpp`
* lattice in `VarLocBasedImpl.cpp`
* lattice for address space inference code in `InferAddressSpaces.cpp`

Reviewed By: silvas, jpienaar

Differential Revision: https://reviews.llvm.org/D110766




More information about the All-commits mailing list