[all-commits] [llvm/llvm-project] 11ee12: [MLIR][LLVM] Realign allocas to avoid dynamic real...

Johannes de Fine Licht via All-commits all-commits at lists.llvm.org
Wed Apr 19 11:42:01 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 11ee125cc1935d068c1dfe72a2005e0a6fda4100
      https://github.com/llvm/llvm-project/commit/11ee125cc1935d068c1dfe72a2005e0a6fda4100
  Author: Johannes de Fine Licht <johannes.definelicht at nextsilicon.com>
  Date:   2023-04-19 (Wed, 19 Apr 2023)

  Changed paths:
    M mlir/lib/Dialect/LLVMIR/IR/LLVMInlining.cpp
    M mlir/lib/Interfaces/DataLayoutInterfaces.cpp
    M mlir/test/Dialect/LLVMIR/inlining.mlir

  Log Message:
  -----------
  [MLIR][LLVM] Realign allocas to avoid dynamic realignment in inliner.

When the natural stack alignment is not set or is larger than or equal
to the target alignment required by a read-only byval argument defined
by an alloca, avoid the copy by just realigning the alloca to the target
alignment.

The code to check existing alignment is reorganized a bit to avoid
redundant casts.

This also includes a bugfix for passing a null DataLayoutInterface to
the DataLayout constructor when no parent op defines
DataLayoutInterface, and will now pass ModuleOp instead in this case.

Reviewed By: gysit

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




More information about the All-commits mailing list