This is an archive of the discontinued LLVM Phabricator instance.

[mlir] StandardToLLVM: make one-to-one convresion pattern publicly available
ClosedPublic

Authored by ftynse on Mar 26 2020, 10:09 AM.

Details

Summary

The Standard-to-LLVM dialect convresion has a set of utility classes that
simplify conversions, including patterns that provide one-to-one conversion
operation conversion with optional result packing. Expose these classes in a
public header so that conversions other than Standard-to-LLVM (e.g. vectors, or
LLVM-based intrinsics) could also use them. Since the patterns are implemented
as class templates and in order to keep the code size limited, keep the
implementation private by resorting to op identifiers instead of template-based
builders.

Diff Detail

Event Timeline

ftynse created this revision.Mar 26 2020, 10:09 AM
This revision is now accepted and ready to land.Mar 26 2020, 10:11 AM
This revision was automatically updated to reflect the committed changes.
rriddle added inline comments.Mar 26 2020, 11:03 AM
mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
1317

nit: I forgot to mention a while ago, but all of these should really just be using directives; e.g.

using SelectOpLowering = OneToOneConvert...;

ftynse marked an inline comment as done.Mar 27 2020, 3:16 AM
ftynse added inline comments.
mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
1317