[Mlir-commits] [mlir] [mlir][IR] Add builtin `TokenType` (PR #195640)
Jacques Pienaar
llvmlistbot at llvm.org
Fri May 29 00:40:45 PDT 2026
================
@@ -109,6 +119,77 @@ static bool mayBeValidWithoutTerminator(Block *block) {
return !op || op->mightHaveTrait<OpTrait::NoTerminator>();
}
+LogicalResult OperationVerifier::verifyTokenValue(
+ Operation &producer, Value value,
+ function_ref<InFlightDiagnostic()> emitProducerError) {
+ if (value.getType() != tokenType)
+ return success();
+
+ if (!producer.mightHaveTrait<OpTrait::TokenProducerTrait>())
+ return emitProducerError();
+
+ for (OpOperand &use : value.getUses()) {
----------------
jpienaar wrote:
Should this be getUsers? I'm guessing the cost of checking the same user multiple times is cheaper than deduping.
https://github.com/llvm/llvm-project/pull/195640
More information about the Mlir-commits
mailing list