[Mlir-commits] [mlir] [mlir] Added `Convergent` trait that matches LLVM's semantics (PR #152358)

Mehdi Amini llvmlistbot at llvm.org
Thu Aug 7 09:02:44 PDT 2025


================
@@ -337,8 +337,12 @@ struct ReturnLike : public TraitBase<ConcreteType, ReturnLike> {
     return success();
   }
 };
-} // namespace OpTrait
 
+// The Operation may not be made control-dependent on any additional values.
+// See https://llvm.org/docs/ConvergentOperations.html for more details.
+template <typename ConcreteType>
+struct Convergent : public TraitBase<ConcreteType, Convergent> {};
----------------
joker-eph wrote:

They are emitted by clang, search for `shouldEmitConvergenceTokens()` there, you'll see the kind of things I have in mind for our structured-to-cfg needs (and actually: a semantics definition of convergence guarantee on our structured control-flow)

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


More information about the Mlir-commits mailing list