llvm-project
735b1c28 - [flang][acc] Introduce interface for rematerializable ops (#174467)

Commit
5 days ago
[flang][acc] Introduce interface for rematerializable ops (#174467) During the outlining process when offloading acc regions, the body of the compute kernel is separated from its original location and live-in values are handled in various ways including becoming function arguments. However, some operations are purely synthetic and only make sense when included with another operation (usually such operations exist to simplify IR design). Bounds and shapes are examples where during outlining they should be recreated inside to capture the full information. Therefore, introduce a new operation interface named OutlineRematerializationOpInterface meant to be attached to such operations. It is currently expected that all such operations are memory effect free to ensure there are no considerations needed when moving or cloning them into outlined regions. The interface is attached to the following operations: - acc.bounds (directly in TableGen) - fir.shape (via external model) - fir.shape_shift (via external model) - fir.shift (via external model) - fir.field_index (via external model) The pass that will use this interface and associated testing will follow in another pull request.
Parents
Loading