[mlir][acc] Add OffloadLiveInValueCanonicalization pass (#174671)

Introduce a pass to canonicalize live-in values for regions that will be
outlined for device execution.

When a region is outlined, values defined outside but used inside become
arguments to the outlined function. However, some values cannot or
should not be passed as arguments:
- Synthetic types (shape metadata, field indices)
- Constants better recreated inside the region
- Address-of operations for device-resident globals

This pass identifies such values and either sinks the defining operation
into the region (when all uses are inside) or clones it inside (when
uses exist both inside and outside).

To identify target regions in a dialect-agnostic way, this patch
introduces `OffloadRegionOpInterface`. This marker interface allows the
pass to work uniformly across OpenACC compute constructs, GPU
operations, and other offload dialects without hardcoding operation
types. The interface is attached to `acc.parallel`, `acc.kernels`, and
`acc.serial` directly through TableGen. It is also being attached to
`gpu.launch` and `cuf.kernel`, the latter through the FIR OpenACC
extensions.

The pass leverages existing interfaces for candidate detection:
`OutlineRematerializationOpInterface` marks operations producing
non-argument-passable values, while `ViewLikeOpInterface` and
`PartialEntityAccessOpInterface` allow tracing through casts and views
to find original defining operations. OpenACCSupport analysis provides
symbol validation for address-of operations.

GitOrigin-RevId: f79f50cd547d0582af15aebd3a0413136b9311ae
9 files changed
tree: ff5b84dc36980f3a29def1973acb31e065cbfb92
  1. benchmark/
  2. cmake/
  3. docs/
  4. examples/
  5. include/
  6. lib/
  7. python/
  8. test/
  9. tools/
  10. unittests/
  11. utils/
  12. .clang-format
  13. .clang-tidy
  14. CMakeLists.txt
  15. LICENSE.TXT
  16. Maintainers.md
  17. README.md
README.md

Multi-Level Intermediate Representation

See https://mlir.llvm.org/ for more information.