[Mlir-commits] [mlir] [mlir][drr] Fix getValueAndRangeUse for Optional operands (PR #138742)
Jacques Pienaar
llvmlistbot at llvm.org
Tue May 13 22:23:06 PDT 2025
================
@@ -303,6 +303,12 @@ std::string SymbolInfoMap::SymbolInfo::getValueAndRangeUse(
case Kind::Operand: {
assert(index < 0);
auto *operand = cast<NamedTypeConstraint *>(op->getArg(getArgIndex()));
+ if (operand->isOptional()) {
+ auto repl =
+ formatv(fmt, formatv("({0}.empty() ? Value() : *{0}.begin())", name));
----------------
jpienaar wrote:
I'll send one (elsehwere in this file we do fully namespace already)
https://github.com/llvm/llvm-project/pull/138742
More information about the Mlir-commits
mailing list