mirror-llvm-project/flang/tools
jeanPerier ef4fbb55b2
[flang][OpenACC] add pass to bufferize fir.box recipes (#163543)
When working on privatization, it is easier to work with fir.box
explicitly in memory, otherwise, there is no way to express that the
fir.box will end-up being a descriptor address in FIR which makes it
hard to deal with data management.

However, introducing fir.ref<fir.box> early can pessimize early HLFIR
optimization because it is harder to reason about the aliasing of
`fir.ref<fir.box>` because of the extra memory indirection.

This patch introduces a pass that turns acc `!fir.box<T>` recipes into
`!fir.ref<!fir.box<T>>` recipes and updated the related recipe usages to
use `!fir.ref<!fir.box<T>>` (creating new alloca+store+load).

It is added to flang and not OpenACC because it is specific to the
`fir.box` type, so it makes little sense to make it an OpenACC generic
pass and to create a new OpenACC dialect type interface for this use
case.
2025-10-16 09:25:23 +02:00
..
bbc [NFC][Flang] Prefer triple overloads of lookupTarget (#162186) 2025-10-06 16:57:36 -07:00
f18 [flang] Do not create omp_lib.f18.mod files (#156311) 2025-09-03 09:53:10 +02:00
f18-parse-demo [flang][OpenMP] Pass OpenMP version to getOpenMPDirectiveName (#139131) 2025-05-09 08:13:52 -05:00
fir-lsp-server [flang] Defined SafeTempArrayCopyAttrInterface for array repacking. (#134346) 2025-04-10 18:41:54 -07:00
fir-opt [flang][OpenACC] add pass to bufferize fir.box recipes (#163543) 2025-10-16 09:25:23 +02:00
flang-driver [NFC][Flang] Prefer triple overloads of lookupTarget (#162186) 2025-10-06 16:57:36 -07:00
tco [flang] Add -O flag to tco (#151869) 2025-08-06 16:04:32 +01:00
.clang-tidy
CMakeLists.txt [flang] Add fir-lsp-server (#114059) 2024-10-30 15:05:18 +00:00