[all-commits] [llvm/llvm-project] 2f66c8: [mlir] Support TBAA metadata in LLVMIR dialect.
Slava Zakharin via All-commits
all-commits at lists.llvm.org
Fri Jan 6 11:17:47 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2f66c891307cbf1e506b04ac2f7add4dbd64c9c5
https://github.com/llvm/llvm-project/commit/2f66c891307cbf1e506b04ac2f7add4dbd64c9c5
Author: Slava Zakharin <szakharin at nvidia.com>
Date: 2023-01-06 (Fri, 06 Jan 2023)
Changed paths:
M mlir/include/mlir/Dialect/LLVMIR/LLVMOpBase.td
M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
M mlir/include/mlir/Target/LLVMIR/ModuleImport.h
M mlir/include/mlir/Target/LLVMIR/ModuleTranslation.h
M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
M mlir/lib/Target/LLVMIR/Dialect/LLVMIR/LLVMIRToLLVMTranslation.cpp
M mlir/lib/Target/LLVMIR/ModuleImport.cpp
M mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
A mlir/test/Dialect/LLVMIR/tbaa-invalid.mlir
A mlir/test/Dialect/LLVMIR/tbaa-roundtrip.mlir
M mlir/test/Target/LLVMIR/Import/import-failure.ll
A mlir/test/Target/LLVMIR/Import/tbaa.ll
A mlir/test/Target/LLVMIR/tbaa.mlir
Log Message:
-----------
[mlir] Support TBAA metadata in LLVMIR dialect.
This change introduces new LLVMIR dialect operations to represent
TBAA root, type descriptor and access tag metadata nodes.
For the purpose of importing TBAA metadata from LLVM IR it only
supports the current version of TBAA format described in
https://llvm.org/docs/LangRef.html#tbaa-metadata (i.e. size-aware
representation introduced in D41501 is not supported).
TBAA attribute support is only added for LLVM::LoadOp and LLVM::StoreOp.
Support for intrinsics operations (e.g. LLVM::MemcpyOp) may be added later.
The TBAA attribute is represented as an array of access tags, though,
LLVM IR supports only single access tag per memory accessing instruction.
I implemented it as an array anticipating similar support in LLVM IR
to combine TBAA graphs with different roots for Flang - one of the options
described in https://docs.google.com/document/d/16kKZVmI585wth01VSaJAqZMZpoX68rcdBmgfj0kNAt0/edit#heading=h.jzzheaz9vqac
It should be easy to restrict MLIR operation to a single access tag,
if we end up using a different approach for Flang.
Differential Revision: https://reviews.llvm.org/D140768
More information about the All-commits
mailing list