I’m trying to to understand MLIR’s stance on const
correct. In LLVM, we had come to the general conclusion that const
correctness is more pain that it is worth in a language by C++ which is mutable-by-default. I am trying to understand if the story is similar in MLIR.
Currently, Op::verifyInvariants
, and subsequently Op::verify
are not const
. Is this because:
a) We expect Op
s to reconfigure state during the verify
pass?
b) We do not care about being const
-correct?
c) We should be const
but we have not bothered?
I think the same happens in the verify
of other MLIR objects as well. I’m not familiar enough with the library to comment.
Thanks a lot.