[all-commits] [llvm/llvm-project] e02d41: [MemRefToLLVM] Add a method in MemRefDescriptor to...

qcolombet via All-commits all-commits at lists.llvm.org
Tue Apr 25 21:14:57 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e02d4142dca48d9359ad304fec629ea3d7e6924c
      https://github.com/llvm/llvm-project/commit/e02d4142dca48d9359ad304fec629ea3d7e6924c
  Author: Quentin Colombet <quentin.colombet at gmail.com>
  Date:   2023-04-26 (Wed, 26 Apr 2023)

  Changed paths:
    M mlir/include/mlir/Conversion/LLVMCommon/MemRefBuilder.h
    M mlir/lib/Conversion/LLVMCommon/MemRefBuilder.cpp
    M mlir/lib/Conversion/LLVMCommon/Pattern.cpp
    M mlir/lib/Conversion/MemRefToLLVM/MemRefToLLVM.cpp
    M mlir/test/Conversion/MemRefToLLVM/expand-then-convert-to-llvm.mlir

  Log Message:
  -----------
  [MemRefToLLVM] Add a method in MemRefDescriptor to get the buffer addr

This patch pushes the computation of the start address of a memref in one
place (a method in MemRefDescriptor.)

This allows all the (indirect) users of this method to produce the start
address in the same way.

Thanks to this change, we expose more CSEs opportunities and thanks to
that, the backend is able to properly find the `llvm.assume` expression
related to the base address as demonstrated in the added test.

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




More information about the All-commits mailing list