Razvan Lupusoru 6a6b99aa80
[acc][flang][cir] Add recipes to data entry operations (#149210)
This patch refactors the OpenACC dialect to attach recipe symbols
directly to data operations (acc.private, acc.firstprivate,
acc.reduction)
rather than to compute constructs (acc.parallel, acc.serial, acc.loop).

Motivation:
The previous design required compute constructs to carry both the recipe
symbol and the variable reference, leading to complexity. Additionally,
recipes were required even when they could be generated automatically
through MappableType interfaces.

Changes:
- Data operations (acc.private, acc.firstprivate, acc.reduction) now
  require a 'recipe' attribute referencing their respective recipe
  operations
- Verifier enforces recipe attribute presence for non-MappableType
  operands; MappableType operands can generate recipes on demand
- Compute constructs (acc.parallel, acc.serial, acc.loop) no longer
  carry recipe symbols in their operands
- Updated flang lowering to attach recipes to data operations instead
  of passing them to compute constructs

Format Migration:
Old format:
```
  acc.parallel private(@recipe -> %var : !fir.ref<i32>) { ... }
```

New format:
```
  %private = acc.private varPtr(%var : !fir.ref<i32>)
              recipe(@recipe) -> !fir.ref<i32>
  acc.parallel private(%private : !fir.ref<i32>) { ... }
```

Test Updates:
- Updated all CIR and Flang OpenACC tests to new format
- Fixed CHECK lines to verify recipe attributes on data operations
2025-11-25 17:59:45 +00:00
..