This patch implements HLFIR lowering for associating an actual
TARGET argument to a dummy POINTER argument.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Thanks for this. Just a couple of small nits
flang/lib/Lower/ConvertCall.cpp | ||
---|---|---|
1155 | Could you use hlfir::convertToAddress (HLFIRTools.h) here? It avoids the use of callContext.stmtCtx, which I believe @jeanPerier intends to remove. | |
flang/test/Lower/HLFIR/actual_target_for_dummy_pointer.f90 | ||
43 | From the naming I would expect this to be class(*), pointer, intent(in) :: p(:) | |
70 | This too |
flang/lib/Lower/ConvertCall.cpp | ||
---|---|---|
1155 | Yes, I could use it. This would require handling the generic clean-up returned as hlfir::CleanupFunction via the CallCleanUp that we use in genUserCall. Note that there is existing use of Fortran::lower::convertToAddress in genIntrinsicRefCore, and there are more uses the statement context. I suppose it is only used for handling the clean-ups. I think switching to hlfir::convertToAddress here should be done when we get rid of the statement context usage and handle the clean-ups uniformly. | |
flang/test/Lower/HLFIR/actual_target_for_dummy_pointer.f90 | ||
43 | Thank you! I will fix it. | |
70 | Thanks! |
flang/lib/Lower/ConvertCall.cpp | ||
---|---|---|
1155 | +1 |
Could you use hlfir::convertToAddress (HLFIRTools.h) here? It avoids the use of callContext.stmtCtx, which I believe @jeanPerier intends to remove.