[Mlir-commits] [mlir] [NVVM][MLIR] Remove Pure trait from clock, clock64, globaltimer Ops (PR #147608)

Durgadoss R llvmlistbot at llvm.org
Thu Jul 10 03:52:10 PDT 2025


================
@@ -153,14 +153,21 @@ class NVVM_IntrOp<string mnem, list<Trait> traits = [],
 // NVVM special register op definitions
 //===----------------------------------------------------------------------===//
 
-class NVVM_SpecialRegisterOp<string mnemonic, list<Trait> traits = []> :
+class NVVM_PureSpecialRegisterOp<string mnemonic, list<Trait> traits = []> :
   NVVM_IntrOp<mnemonic, !listconcat(traits, [Pure]), 1> {
   let arguments = (ins);
   let assemblyFormat = "attr-dict `:` type($res)";
 }
 
+// NVVM_SpecialRegisterOp represents a non-constant special register
----------------
durga4github wrote:

Yes, basically we want to convey what `pure` and `non-pure` represent.
(The td file I pointed to clearly says speculatable/can hoist-sink for pure etc.)

May be, we should add this comment on top of `pure` SpecialRegister class
(and not say anything here implying it is not-pure)

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


More information about the Mlir-commits mailing list