[PATCH] D74889: [mlir] Generalize intrinsic builders in the LLVM dialect definition

Alex Zinenko via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 20 01:32:38 PST 2020


ftynse created this revision.
ftynse added reviewers: aartbik, antiagainst.
Herald added subscribers: llvm-commits, Joonsoo, liufengdb, lucyrfox, mgester, arpith-jacob, nicolasvasilache, shauheen, burmako, jpienaar, rriddle, mehdi_amini.
Herald added a project: LLVM.

All LLVM IR intrinsics are constructed in a similar way. The ODS definition of
the LLVM dialect in MLIR also lists multiple intrinsics, many of which
reproduce the same (or similar enough) code stanza to translate the MLIR
operation into the LLVM IR intrinsic. Provide a single base class containing
parameterizable code to build LLVM IR intrinsics given their name and the lists
of overloadable operands and results. Use this class to remove (almost)
duplicate translations for intrinsics defined in LLVMOps.td.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D74889

Files:
  mlir/include/mlir/Dialect/LLVMIR/LLVMOpBase.td
  mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74889.245602.patch
Type: text/x-patch
Size: 10761 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200220/fa0effb0/attachment.bin>


More information about the llvm-commits mailing list