[PATCH] D73421: [mlir][spirv] NFC: expose builtin func op conversion pattern

Lei Zhang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 25 14:11:21 PST 2020


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

This commit exposes the func op conversion pattern via a new
`populateBuiltinFuncToSPIRVPatterns` function from the standard
to SPIR-V conversion passs. This is structurally better given
that func op belongs to the builtin dialect. More importantly,
this makes the pattern reusable to other dialect to SPIR-V
dialect conversion as other dialect can well adopt builtin
func op instead of having its own. Besides, it's very common
to use func ops as test wrappers in lit tests, so test passes
will need to handle func ops too.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D73421

Files:
  mlir/include/mlir/Dialect/SPIRV/SPIRVLowering.h
  mlir/lib/Conversion/StandardToSPIRV/ConvertStandardToSPIRVPass.cpp
  mlir/lib/Dialect/SPIRV/SPIRVLowering.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73421.240397.patch
Type: text/x-patch
Size: 5522 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200125/fb480531/attachment.bin>


More information about the llvm-commits mailing list