aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-objdump/llvm-objdump.cpp
diff options
context:
space:
mode:
authorAlex Zinenko <zinenko@google.com>2020-12-16 18:32:26 +0100
committerAlex Zinenko <zinenko@google.com>2020-12-17 09:21:42 +0100
commit96076a2edbd63e3e9d6ee0eca0c90d34579b7602 (patch)
tree2d8f7af61ba55373b3b0c8bea4bc4af19cdb83e9 /llvm/tools/llvm-objdump/llvm-objdump.cpp
parentebdd20f430c408e200d5c60ef957e777841f0fa3 (diff)
downloadllvm-96076a2edbd63e3e9d6ee0eca0c90d34579b7602.zip
llvm-96076a2edbd63e3e9d6ee0eca0c90d34579b7602.tar.gz
llvm-96076a2edbd63e3e9d6ee0eca0c90d34579b7602.tar.bz2
[mlir] Support index and memref types in llvm.mlir.cast
This operation is designed to support partial conversion, more specifically the IR state in which some operations expect or produce built-in types and some operations produce and expect LLVM dialect types. It is reasonable for it to support cast between built-in types and any equivalent that could be produced by the type conversion. (At the same time, we don't want the dialect to depend on the type conversion as it could lead to a dependency cycle). Introduce support for casting from index to any integer type and back, and from memref to bare pointer or memref descriptor type and back. Contrary to what the TODO in the code stated, there are no particular precautions necessary to handle the bare pointer conversion for memerfs. This conversion applies exclusively to statically-shaped memrefs, so we can always recover the full descriptor contents from the type. This patch simultaneously tightens the verification for other types to only accept matching pairs of types, e.g., i64 and !llvm.i64, as opposed to the previous implementation that only checked if the types were generally allowed byt not for matching, e.g. i64 could be "casted" to !llvm.bfloat, which is not the intended semantics. Move the relevant test under test/Dialect/LLVMIR because it is not specific to the conversion pass, but rather exercises an op in the dialect. If we decide this op does not belong to the LLVM dialect, both the dialect and the op should move together. Reviewed By: silvas, ezhulenev Differential Revision: https://reviews.llvm.org/D93405
Diffstat (limited to 'llvm/tools/llvm-objdump/llvm-objdump.cpp')
0 files changed, 0 insertions, 0 deletions