[Mlir-commits] [mlir] [MLIR] Fix -remove-dead-values with external function & deleted arguments (PR #99671)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Mon Jul 22 14:00:25 PDT 2024


================
@@ -1124,15 +1124,15 @@ static void getGenericEffectsImpl(
         &effects,
     LinalgOp linalgOp) {
   for (auto [index, operand] : llvm::enumerate(linalgOp.getDpsInputs())) {
-    if (!llvm::isa<MemRefType>(operand.getType()))
+    if (!operand || !llvm::isa<MemRefType>(operand.getType()))
----------------
MaheshRavishankar wrote:

Yeah, if an operand can suddenly point to null values, then that is a problem and a lot of code can break. I am not sure how you are removing values without knowing they are indeed dead. 

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


More information about the Mlir-commits mailing list