[Mlir-commits] [mlir] [mlir] Do not bufferize parallel_insert_slice dest to read for full slices (PR #112761)
Han-Chung Wang
llvmlistbot at llvm.org
Fri Oct 18 09:19:01 PDT 2024
================
@@ -137,6 +138,22 @@ bool isConstantIntValue(OpFoldResult ofr, int64_t value) {
return val && *val == value;
}
+/// Return true if all of `ofrs` are constant integers equal to `value`.
+bool areAllConstantIntValue(ArrayRef<OpFoldResult> ofrs, int64_t value) {
+ return llvm::all_of(
+ ofrs, [&](OpFoldResult ofr) { return isConstantIntValue(ofr, value); });
+}
+
+/// Return true if all of `ofrs` are constant integers equal to the
+/// corresponding value in `values`.
+bool areConstantIntValues(ArrayRef<OpFoldResult> ofrs,
----------------
hanhanW wrote:
nit: Remove the comments because they should (and are already) be documented in `.h` files.
https://github.com/llvm/llvm-project/pull/112761
More information about the Mlir-commits
mailing list