Add affine demotion pass.
Affine dialect's default lowering for loads and stores is different from
fir as it uses the memref type. The memref type is not compatible with
the Fortran runtime. Therefore, conversion of memory operations back to
fir.load and fir.store with !fir.ref<?> types is required.
This patch is part of the upstreaming effort from fir-dev branch.
Co-authored-by: Jean Perier <jperier@nvidia.com>
Co-authored-by: Eric Schweitz <eschweitz@nvidia.com>
Co-authored-by: V Donaldson <vdonaldson@nvidia.com>
Co-authored-by: Rajan Walia <walrajan@gmail.com>
Co-authored-by: Sourabh Singh Tomar <SourabhSingh.Tomar@amd.com>