SuccessChanges

Summary

  1. [mlir] translate types between MLIR LLVM dialect and LLVM IR (details)
  2. [mlir] provide same APIs as existing LLVMType in the new LLVM type modeling (details)
  3. [InstSimplify] reduce code for min/max analysis; NFC (details)
  4. [InstSimplify] add tests for min/max with constants; NFC (details)
Commit d4fbbab2e494a59480096a257136ed2b75d07e87 by zinenko
[mlir] translate types between MLIR LLVM dialect and LLVM IR

With new LLVM dialect type modeling, the dialect types no longer wrap LLVM IR
types. Therefore, they need to be translated to and from LLVM IR during export
and import. Introduce the relevant functionality for translating types. It is
currently exercised by an ad-hoc type translation roundtripping test that will
be subsumed by the actual translation test when the type system transition is
complete.

Depends On D84339

Reviewed By: herhut

Differential Revision: https://reviews.llvm.org/D85019
The file was modifiedmlir/tools/mlir-translate/CMakeLists.txt (diff)
The file was addedmlir/test/lib/Target/CMakeLists.txt
The file was addedmlir/test/Target/llvmir-types.mlir
The file was modifiedmlir/test/lib/CMakeLists.txt (diff)
The file was modifiedmlir/lib/Target/CMakeLists.txt (diff)
The file was addedmlir/lib/Target/LLVMIR/TypeTranslation.cpp
The file was addedmlir/include/mlir/Target/LLVMIR/TypeTranslation.h
The file was addedmlir/test/lib/Target/TestLLVMTypeTranslation.cpp
The file was modifiedmlir/tools/mlir-translate/mlir-translate.cpp (diff)
Commit 6abd7e2e622bc7eabdb673a7815f6673523a1e94 by zinenko
[mlir] provide same APIs as existing LLVMType in the new LLVM type modeling

These are intended to smoothen the transition and may be removed in the future
in favor of more MLIR-compatible APIs. They intentionally have the same
semantics as the existing functions, which must remain stable until the
transition is complete.

Depends On D85019

Reviewed By: nicolasvasilache

Differential Revision: https://reviews.llvm.org/D85020
The file was modifiedmlir/lib/Dialect/LLVMIR/IR/LLVMTypes.cpp (diff)
The file was modifiedmlir/include/mlir/Dialect/LLVMIR/LLVMTypes.h (diff)
Commit 20c71e55aad5bf6008c7f5ed63c90ed98907fa99 by spatel
[InstSimplify] reduce code for min/max analysis; NFC

This should probably be moved up to some common area eventually
when there's another user.
The file was modifiedllvm/lib/Analysis/InstructionSimplify.cpp (diff)
Commit 011e15bea3456cf429a801e309c65bef14fa22ad by spatel
[InstSimplify] add tests for min/max with constants; NFC
The file was modifiedllvm/test/Transforms/InstSimplify/maxmin_intrinsics.ll (diff)