[all-commits] [llvm/llvm-project] 917f07: [mlir][Transforms] Allow RemoveDeadValues to proce...

xin liu via All-commits all-commits at lists.llvm.org
Sun Aug 31 03:00:53 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 917f078adb3ffab4cf50aec3e13c977c092d7754
      https://github.com/llvm/llvm-project/commit/917f078adb3ffab4cf50aec3e13c977c092d7754
  Author: xin liu <navy.xliu at gmail.com>
  Date:   2025-08-31 (Sun, 31 Aug 2025)

  Changed paths:
    M mlir/lib/Transforms/RemoveDeadValues.cpp
    M mlir/test/Transforms/remove-dead-values.mlir

  Log Message:
  -----------
  [mlir][Transforms] Allow RemoveDeadValues to process a function whose the last block is not the exit. (#156123)

'processFuncOp' queries the number of returned values of a function
using the terminator of the last block's getNumOperands(). It presumes
the last block is the exit. It is not always the case. 
This patch fixes the bug by querying from FunctionInterfaceOp directly.



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