[Mlir-commits] [mlir] [OpenMP][Flang] Add "IsolatedFromAbove" and "OutlineableOpenMPOpInterface" trait to omp.target (PR #67164)
Akash Banerjee
llvmlistbot at llvm.org
Wed Sep 27 08:01:40 PDT 2023
TIFitis wrote:
> The `OutlineableOpenMPOpInterface` looks like a separate change.
Other operations inside the target region such as WS loop may try to add new allocas outside the target region. Because of the IsolatedFromAbove trait, this should not be allowed. To prevent other operations from adding such allocas, the OutlineableOpenMPOpInterface trait is also added in conjunction. With this trait new allocas from other operations are added inside the target region.
> Could you expand on what is being done for the implicit operands? Are they added to the map operands? Or are they just entry block arguments?
>
> Could you also comment on (and add to the summary) why this is advantageous to the outlining approach?
Implicit operands are first added as implicitly captured map_operands with their map_types set accordingly to indicate this. Later, all map_operands including implicit ones are added as block arguments.
All operands defined outside the region must now become block arguments to the target region due to the IsolatedFromAbove trait. Thus, handling the implicit map operands here is a necessity. Moreover, as apparent from recent patches, maintaining the EarlyOutliningPass was becoming increasingly difficult which this eliminates.
https://github.com/llvm/llvm-project/pull/67164
More information about the Mlir-commits
mailing list