[all-commits] [llvm/llvm-project] 738797: [MLIR][LLVM] Inline LLVM::StackSaveOp and LLVM::St...

Johannes de Fine Licht via All-commits all-commits at lists.llvm.org
Thu Apr 13 01:37:45 PDT 2023


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

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

  Log Message:
  -----------
  [MLIR][LLVM] Inline LLVM::StackSaveOp and LLVM::StackRestoreOp.

Support LLVM::StackSaveOp and LLVM::StackRestoreOp in the LLVM dialect
inliner in MLIR.

Inserts new LLVM::StackSaveOp and LLVM::StackRestoreOp intrinsics when
dynamic allocas are detected in the inlined blocks. This may result in
multiple saves/restores in the same block if some are already present in
the caller, which is legal IR, but is cleaned up in LLVM. There is not
yet a canonicalization pattern for this on LLVM dialect in MLIR.

Reviewed By: Dinistro

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




More information about the All-commits mailing list