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
58 KiB
58 KiB