[Polly] Apply gist only after converting to pw_aff (#192975)

A single-valued set/map is not necessarily single-valued anymore after
applying after gisting a context. In particular, the set/map might not
be single-valued outside the context.

Convert the result of MemoryAccess::getAddressFunction() directly to
pw_aff. Since it is the result of lexmin(), it is single-valued by
definition. Gist the context only after te conversion.

We should consider using `isl_basic_map_partial_lexmin_pw_multi_aff` in
`getAddressFunction()` directly to avoid the intermediate step.

Fixes #190459

GitOrigin-RevId: 6b7d1a494bd9e2e57fe156faffe19ba8ea6a0ee0
3 files changed