[all-commits] [llvm/llvm-project] b83d0d: [mlir][spirv] Make MemRef memory space mapping pas...

Lei Zhang via All-commits all-commits at lists.llvm.org
Tue Aug 9 11:22:04 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b83d0d46c0b197c36c671493a3339d8d7a8bcd6a
  Author: Lei Zhang <antiagainst at google.com>
  Date:   2022-08-09 (Tue, 09 Aug 2022)

  Changed paths:
    M mlir/include/mlir/Conversion/MemRefToSPIRV/MemRefToSPIRVPass.h
    M mlir/include/mlir/Conversion/Passes.td
    M mlir/lib/Conversion/MemRefToSPIRV/MapMemRefStorageClassPass.cpp
    M mlir/test/Conversion/MemRefToSPIRV/map-storage-class.mlir

  Log Message:
  [mlir][spirv] Make MemRef memory space mapping pass more flexible

* Avoid restricting the pass to to builtin module ops. The pass
  should be able to run on any region ops.
* Avoid hardcoding func FuncOp when handling functions. Instead,
  use the function op interface.
* Assigns the default mapping in the constructor. So for cases
  where we are using the pass in a pipeline, we still have a
  meaningful default.

Along the way, dropped uncessary unrealized conversion casts and
use full conversion. The pass should be able to convert all sorts
of ops; there is really no need to have such bridages.

Reviewed By: kuhar

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

More information about the All-commits mailing list