Changes

Summary

  1. [MLIR] Update MLIR build config to reflect cmake variable renames (details)
Commit fb799b0116c821fe31d9f3640c795f4771360cc9 by uday
[MLIR] Update MLIR build config to reflect cmake variable renames

Update CMake variables to reflect the migration for a consistent naming:
https://reviews.llvm.org/D102976

Additional discussion at:
https://llvm.discourse.group/t/mlir-cmake-enable-variable-naming-convention/3520

Differential Revision: https://reviews.llvm.org/D102977
The file was modifiedbuildbot/osuosl/master/config/builders.py (diff)

Summary

  1. [Attributor][NFC] Rerun update_test_checks script on Attributor tests (details)
  2. [Attributor][NFC] Clang format the Attributor source files (details)
  3. [Attributor][NFC] Add helpful debug outputs (details)
  4. [Attributor][NFC] Precommit test case with branch on undef (details)
  5. [Attributor][FIX] Ensure we replace undef if we see the first "real" value (details)
  6. [Attributor][FIX] Account for undef in the constant value lattice (details)
  7. [mlir] Normalize dynamic memrefs with a map of tiled-layout. (details)
  8. [MLIR] Make MLIR cmake variable names consistent (details)
Commit 8387d74c20776631179e2c45763681b705815af6 by johannes
[Attributor][NFC] Rerun update_test_checks script on Attributor tests
The file was modifiedllvm/test/Transforms/Attributor/ArgumentPromotion/profile.ll
Commit cb511531b9249b62a1488f61d1e0861680d8ae34 by johannes
[Attributor][NFC] Clang format the Attributor source files
The file was modifiedllvm/lib/Transforms/IPO/AttributorAttributes.cpp
Commit 2bc51d39db7a997af24776fbef3c0d552aa91ef8 by johannes
[Attributor][NFC] Add helpful debug outputs
The file was modifiedllvm/lib/Transforms/IPO/AttributorAttributes.cpp
The file was modifiedllvm/lib/Transforms/IPO/Attributor.cpp
Commit 9098fc9f427fcc61c37903646e5e09f59a708fd5 by johannes
[Attributor][NFC] Precommit test case with branch on undef

This test exposes a bug in the module pass as it simplifies ipccp4 to
unreachable, which is unfortunately wrong.
The file was modifiedllvm/test/Transforms/Attributor/value-simplify.ll
Commit 5cdc29f7958263b754908ca0bd69be802e1f42f3 by johannes
[Attributor][FIX] Ensure we replace undef if we see the first "real" value

The state of AAPotentialValues tracks if undef is contained. It should
fold undef into the first non-undef value. However we missed a case
before. There was also a shadowing definition of two variables that
caused trouble. The test exposes both problems.
The file was modifiedllvm/test/Transforms/Attributor/potential.ll
The file was modifiedllvm/lib/Transforms/IPO/AttributorAttributes.cpp
The file was modifiedllvm/test/Transforms/Attributor/value-simplify.ll
The file was modifiedllvm/include/llvm/Transforms/IPO/Attributor.h
Commit e93ac1e2de66e8feae3cec3b6c0707b14c79dfeb by johannes
[Attributor][FIX] Account for undef in the constant value lattice

The constant value lattice looks like this

```
  <None>
     |
  <undef>
  /  |   \
... <0>  ...
\   |   /
<unknown>
```
We did not account for the undef and assumed a value meant we could not
change anymore. Now we actually check if we have the same value as
before, which will signal CHANGED to the users when we go from undef to
a specific constant.

This fixes, among other things, the bug exposed by @ipccp4 in
`value-simplify.ll`.
The file was modifiedllvm/lib/Transforms/IPO/AttributorAttributes.cpp
The file was modifiedllvm/test/Transforms/Attributor/IPConstantProp/PR43857.ll
The file was modifiedllvm/test/Transforms/Attributor/value-simplify.ll
The file was modifiedllvm/test/Transforms/Attributor/memory_locations.ll
The file was modifiedllvm/test/Transforms/Attributor/IPConstantProp/musttail-call.ll
The file was modifiedllvm/test/Transforms/Attributor/IPConstantProp/solve-after-each-resolving-undefs-for-function.ll
The file was modifiedllvm/test/Transforms/Attributor/nodelete.ll
The file was modifiedllvm/test/Transforms/Attributor/undefined_behavior.ll
The file was modifiedllvm/test/Transforms/Attributor/IPConstantProp/fp-bc-icmp-const-fold.ll
The file was modifiedllvm/test/Transforms/Attributor/nonnull.ll
The file was modifiedllvm/lib/Transforms/IPO/Attributor.cpp
Commit 000a05fd1ab33329f7ef2dd85a3f027a7d0c3a4b by uday
[mlir] Normalize dynamic memrefs with a map of tiled-layout.

Steps for normalizing dynamic memrefs for tiled layout map
1. Check if original map is tiled layout. Only tiled layout is supported.
2. Create normalized memrefType. Dimensions that include dynamic dimensions
   in the map output will be dynamic dimensions.
3. Create new maps to calculate each dimension size of new memref.
   In tiled layout, the dimension size can be calculated by replacing
    "floordiv <tile size>" with "ceildiv <tile size>" and
    "mod <tile size>" with "<tile size>".
4. Create AffineApplyOp to apply the new maps. The output of AffineApplyOp is
   dynamicSizes for new AllocOp.
5. Add the new dynamic sizes in new AllocOp.

This patch also set MemRefsNormalizable trant in CastOp and DimOp since
they used with dynamic memrefs.

Reviewed By: bondhugula

Differential Revision: https://reviews.llvm.org/D97655
The file was modifiedmlir/include/mlir/Dialect/MemRef/IR/MemRefOps.td
The file was addedmlir/test/Transforms/normalize-memrefs-ops-dynamic.mlir
The file was modifiedmlir/include/mlir/Transforms/Passes.td
The file was modifiedmlir/lib/Transforms/PassDetail.h
The file was modifiedmlir/lib/Transforms/Utils/Utils.cpp
Commit 9c21ddb70ab56eb3ca5b0f99faa18bb3af17b3df by uday
[MLIR] Make MLIR cmake variable names consistent

Fix inconsistent MLIR CMake variable names. Consistently name them as
MLIR_ENABLE_<feature>.

Eg: MLIR_CUDA_RUNNER_ENABLED -> MLIR_ENABLE_CUDA_RUNNER

MLIR follows (or has mostly followed) the convention of naming
cmake enabling variables in the from MLIR_ENABLE_... etc. Using a
convention here is easy and also important for convenience. A counter
pattern was started with variables named MLIR_..._ENABLED. This led to a
sequence of related counter patterns: MLIR_CUDA_RUNNER_ENABLED,
MLIR_ROCM_RUNNER_ENABLED, etc.. From a naming standpoint, the imperative
form is more meaningful. Additional discussion at:
https://llvm.discourse.group/t/mlir-cmake-enable-variable-naming-convention/3520

Switch all inconsistent ones to the ENABLE form. Keep the couple of old
mappings needed until buildbot config is migrated.

Differential Revision: https://reviews.llvm.org/D102976
The file was modifiedmlir/test/CMakeLists.txt
The file was modifiedmlir/CMakeLists.txt
The file was modifiedmlir/docs/Bindings/Python.md
The file was modifiedmlir/docs/SPIRVToLLVMDialectConversion.md
The file was modifiedmlir/lib/Dialect/GPU/CMakeLists.txt
The file was modifiedmlir/docs/Tools/LinalgOpDsl.md
The file was modifiedmlir/lib/ExecutionEngine/CMakeLists.txt
The file was modifiedmlir/lib/Conversion/GPUCommon/CMakeLists.txt
The file was modifiedmlir/cmake/modules/AddMLIRPython.cmake
The file was modifiedmlir/test/lit.site.cfg.py.in
The file was modifiedmlir/lib/Bindings/CMakeLists.txt

Summary

  1. [MLIR] Update MLIR build config to reflect cmake variable renames (details)
Commit fb799b0116c821fe31d9f3640c795f4771360cc9 by uday
[MLIR] Update MLIR build config to reflect cmake variable renames

Update CMake variables to reflect the migration for a consistent naming:
https://reviews.llvm.org/D102976

Additional discussion at:
https://llvm.discourse.group/t/mlir-cmake-enable-variable-naming-convention/3520

Differential Revision: https://reviews.llvm.org/D102977
The file was modifiedbuildbot/osuosl/master/config/builders.py