[flang-commits] [flang] [flang][MLIR][OpenMP] Extend delayed privatization for allocatables (PR #84033)
Kareem Ergawy via flang-commits
flang-commits at lists.llvm.org
Tue Mar 5 08:16:56 PST 2024
ergawy wrote:
> We have not made specific changes for HLFIR lowering in the privatisation code and could have inadvertently used both `#0` and `#1`. Can we use `#0` for both of the usages? It could be just about modifying `getSymbolAddress` or a similar function in the converter.
I am not sure to be honest. Since the 2 values can be of different types in some cases, I assumed both need to be maintained.
I also guess it goes deeper than `getSymbolAddress`. If you take a look at https://github.com/llvm/llvm-project/blob/main/flang/lib/Optimizer/Builder/HLFIRTools.cpp#L186, the code explicitly calls `declareOp.getOriginalBase()` which returns the second result of `hlfir.declare`. At the start, I tried changing this to use `declareOp.getBase()` instead but a huge number of tests failed. However, admittedly, I didn't closely check the failures.
This is just from what I learned in the past 2 weeks staring at this part of the codebase, so I might be over complicating things for sure.
https://github.com/llvm/llvm-project/pull/84033
More information about the flang-commits
mailing list