[RFC] Prevent CSE from removing expressions inside some non-`IsolatedFromAbove` operation regions

I found this comment from Alex in another RFC:
" Generally, we encourage folks to implement transformations on op interfaces rather than make them aware of specific ops. The idea is that ops can opt into a transformation by implementing a corresponding interface and thus establishing a contract with the transformation about legality. This is a relatively recent feature and “older” transformations such as those on loops may not be using it to its full potential"

I think this is what I was saying, and perhaps CSE is one of these older transforms that should be updated. I think common properties like single-threaded execution, maintained machine state (e.g. rounding mode, or device), no implicit loops, no volatile memory etc. could be part of an interface to limit the transform.

Link to the other RFC: