[all-commits] [llvm/llvm-project] 5c5daf: [mlir] support materialization for 1-1 type conver...

ftynse via All-commits all-commits at lists.llvm.org
Tue Jun 2 04:48:54 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 5c5dafc534ac80aad978f4092ff842457aab6d07
      https://github.com/llvm/llvm-project/commit/5c5dafc534ac80aad978f4092ff842457aab6d07
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2020-06-02 (Tue, 02 Jun 2020)

  Changed paths:
    M mlir/docs/DialectConversion.md
    M mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h
    M mlir/include/mlir/Transforms/DialectConversion.h
    M mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
    M mlir/lib/Transforms/DialectConversion.cpp
    M mlir/test/Transforms/test-legalizer.mlir
    M mlir/test/lib/Dialect/Test/TestPatterns.cpp

  Log Message:
  -----------
  [mlir] support materialization for 1-1 type conversions

Dialect conversion infrastructure supports 1->N type conversions by requiring
individual conversions to provide facilities to generate operations
retrofitting N values into 1 of the original type when N > 1. This
functionality can also be used to materialize explicit "cast"-like operations,
but it did not support 1->1 type conversions until now. Modify TypeConverter to
support materialization of cast operations for 1-1 conversions.

This also makes materialization specification more extensible following the
same pattern as type conversions. Instead of overloading a virtual function,
users or subclasses of TypeConversion can now register type-specific
materialization callbacks that will be called in order for the given type.

Differential Revision: https://reviews.llvm.org/D79729




More information about the All-commits mailing list