mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-24 17:26:11 +00:00

This is a document describing why and how to add support for repacking of assumed-shape dummy arrrays to provide more efficient data cache. It proposes adding new FIR operations and outlines the compiler flow handling these operations. I would like to hear feedback on all of it, but especially on: * The possibility of detecting safeness of the repacking in the context of OpenACC/OpenMP. If it is not possible to do the runtime checks to determine safety, then there is not need to add the `TempCopyIsSafe` attributes to the instruction. * Whether it is possible to preserve the debug information in cases where `fir.pack_array` is sunk after `[hl]fir.declare`, so that before the `fir.pack_array` a debugger will refer to the values in the original array, and after `fir.pack_array` it will refer to the copy.