[all-commits] [llvm/llvm-project] 20a104: [mlir] allow function type cloning to fail (#136300)

ftynse via All-commits all-commits at lists.llvm.org
Fri Apr 18 07:06:15 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 20a104a7d6423784dab04371a5ca728cc27a15a9
      https://github.com/llvm/llvm-project/commit/20a104a7d6423784dab04371a5ca728cc27a15a9
  Author: Oleksandr "Alex" Zinenko <git at ozinenko.com>
  Date:   2025-04-18 (Fri, 18 Apr 2025)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/LLVMTypes.td
    M mlir/include/mlir/Interfaces/FunctionInterfaces.td
    M mlir/lib/Conversion/GPUCommon/GPUOpsLowering.cpp
    M mlir/lib/Dialect/Bufferization/Transforms/BufferResultsToOutParams.cpp
    M mlir/lib/Dialect/Bufferization/Transforms/DropEquivalentBufferResults.cpp
    M mlir/lib/Dialect/LLVMIR/IR/LLVMTypes.cpp
    M mlir/lib/Query/Query.cpp
    M mlir/lib/Transforms/RemoveDeadValues.cpp
    M mlir/test/IR/test-func-erase-result.mlir
    M mlir/test/lib/IR/TestFunc.cpp

  Log Message:
  -----------
  [mlir] allow function type cloning to fail (#136300)

`FunctionOpInterface` assumed the fact that the function type (attribute
of the operation) can be cloned with arbirary lists of function
arguments and results to support argument and result list mutation. This
is not always correct, in particular, LLVM dialect functions require
exactly one result making it impossible to erase the result.

Allow function type cloning to fail and propagate this failure through
various APIs that use it. The common assumption is that existing IR has
not been modified.

Fixes #131142.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list