This is an archive of the discontinued LLVM Phabricator instance.

[flang][openacc] Add possibility to add name to alloca of private copy in reduction recipe
AbandonedPublic

Authored by clementval on Jul 24 2023, 10:32 AM.

Details

Summary

Add possiblity to pass name for the allocation of the private copy
as follow up to D155882

Diff Detail

Event Timeline

clementval created this revision.Jul 24 2023, 10:32 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJul 24 2023, 10:32 AM
clementval requested review of this revision.Jul 24 2023, 10:32 AM
This revision is now accepted and ready to land.Jul 24 2023, 9:37 PM

This patch is not what I had in mind when I made the name suggestion. Namely, I was thinking the init region would take an additional argument specifying the name - and this would be related to the original variable name. This way a recipe could be reused, but the fir.alloca operations could expand to proper name during materialization.

flang/lib/Lower/OpenACC.cpp
1000

I expected the name to be extracted from original variable name! This name is not necessarily useful when debugging.

This patch is not what I had in mind when I made the name suggestion. Namely, I was thinking the init region would take an additional argument specifying the name - and this would be related to the original variable name. This way a recipe could be reused, but the fir.alloca operations could expand to proper name during materialization.

I see your point but I don't think we can pass a ssa value for the name of the fir.alloca's name. What we can probably do is just leave the init region as is. The materialization should be able to gather any alloca and update them with appropriate name if desired.

I see your point but I don't think we can pass a ssa value for the name of the fir.alloca's name. What we can probably do is just leave the init region as is. The materialization should be able to gather any alloca and update them with appropriate name if desired.

Good point. In that case, I am comfortable leaving as-is without a name.

clementval abandoned this revision.Jul 25 2023, 2:35 PM

Leave it without name for the moment.