This change adds two helper functions: runtimeAbort/runtimeAssert. These can be used to generate runtime assertions.
This change adds runtime asserts to check for invalid memref::CollapseShapeOps. In the static case, these are already detected during op verification. With this change, the program execution crashes explictly at runtime when the assertion is violated. For now, this assertion is activated only on an opt-in basis (to avoid performance regressions).
Do you expect the following runtimeAssert to be replaced by "nothing"?
Put differently do we need to keep this cast?