[Mlir-commits] [mlir] [mlir][Transforms] --remove-dead-values: keep values used in public function calls (PR #83249)

Mehdi Amini llvmlistbot at llvm.org
Wed Feb 28 15:33:22 PST 2024


================
@@ -169,7 +169,10 @@ static SmallVector<OpOperand *> operandsToOpOperands(OperandRange operands) {
 /// Here, cleaning means:
 ///   (1) Dropping all its uses, AND
 ///   (2) Erasing it
-/// iff it has no memory effects and none of its results are live.
+/// iff:
+///   (1) It has no memory effects
+///   (2) None of its results are live
+///   (3) It is not used as an argument in a public function call
----------------
joker-eph wrote:

You can't touch a function API when you don't see all the calls, and by definition a public function has external calls you don't see.

You may clone the function to specialize it though, but that's a different tradeoff to make

https://github.com/llvm/llvm-project/pull/83249


More information about the Mlir-commits mailing list