Perform common subexpression elimination on FIR operations. This pass
differs from the MLIR CSE pass in that it is FIR/Fortran semantics aware.
It takes advantages of additional Fortran semantic such as pure function call.
pure procedures and functions are free of side effects. In some cases,
pure calls can be safely removed.
fir.load are also optimized by this dedicated CSE pass. Volatile loads will
prevent the optimization to happen.
Running the same test (flang/test/Fir/cse.fir) through the MLIR CSE
pass will not give a similar results.
This patch is part of the upstreaming effort from fir-dev branch.