This was mostly done automatically with
https://github.com/llvm/llvm-project/compare/main...tpopp:llvm-project:tidy-cast-check
Some manual changes were done for .td files and macros.
Context:
- https://mlir.llvm.org/deprecation/ at "Use the free function variants for dyn_cast/cast/isa/…"
- Original discussion at https://discourse.llvm.org/t/preferred-casting-style-going-forward/68443