Update the code generated in the init region to materialize the private
copy.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Small nit on the title of this patch.
Materilize the private copy in reduction init region
->
Update materialization recipe for private copy in reduction init region
I would say that materialization happens when recipe is used, not created.
The other question is whether a name should also be passed to recipe for the fir.alloca. To me it makes sense since the recipe may be reused. If we did want to give a name to the private later when materialization actually happens, the recipe must be updated with a new fir.alloca and the materializer must actually understand the recipe to find the allocation - so hence why it makes sense to me to give it name as argument now. If you think so too, it can be something to follow-up on in the future - not in this patch.
From the current code perspective, it looks good to me.