[mlir][llvm] Add branch weights to call and invoke
authorChristian Ulmann <christian.ulmann@nextsilicon.com>
Mon, 9 Jan 2023 09:14:21 +0000 (10:14 +0100)
committerTobias Gysi <tobias.gysi@nextsilicon.com>
Mon, 9 Jan 2023 09:25:07 +0000 (10:25 +0100)
commit51e36f217f868183059aa72e2f69d1f8492330e3
treea1d62f9647d417a1d6ff36cee9e8d4aa1e2206c5
parent6c1cf201be158b56e50b3f96fc61b8b2867a0017
[mlir][llvm] Add branch weights to call and invoke

This commit introduces branch weight attributes to the LLVM::CallOp and
LLVM::InvokeOp and adds both import and export of them.

Reviewed By: gysit

Differential Revision: https://reviews.llvm.org/D141122
mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
mlir/lib/Target/LLVMIR/Dialect/LLVMIR/LLVMIRToLLVMTranslation.cpp
mlir/lib/Target/LLVMIR/Dialect/LLVMIR/LLVMToLLVMIRTranslation.cpp
mlir/test/Target/LLVMIR/Import/profiling-metadata.ll
mlir/test/Target/LLVMIR/llvmir.mlir