MLIR provides a number of generic compiler optimizations out of the box that we aren't currently taking advantage of. Here's an incomplete list of optimizations that seem useful and relatively straightforward to incorporate:
- Loop invariant code motion
- Loop unswitching
- Control flow sinking
- Sparse conditional constant propagation