[Mlir-commits] [mlir] [mlir] Fix block merging (PR #97697)

Giuseppe Rossini llvmlistbot at llvm.org
Tue Jul 9 01:53:14 PDT 2024


================
@@ -674,6 +679,64 @@ static bool ableToUpdatePredOperands(Block *block) {
   return true;
 }
 
+/// Prunes the redundant list of arguments. E.g., if we are passing an argument
+/// list like [x, y, z, x] this would return [x, y, z] and it would update the
+/// `block` (to whom the argument are passed to) accordingly
+static void
+pruneRedundantArguments(SmallVector<SmallVector<Value, 8>, 2> &newArguments,
----------------
giuseros wrote:

I ended up returning the `SmallVector<SmallVector<Value, 8>, 2>`. I tried to use the `SmallVectorImpl`, but the problem is that I am dealing with a vector-of-vectors, so it was a bit more complicated. 

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


More information about the Mlir-commits mailing list