Add lowering for non constant lower and upper bounds
in array section.
Details
Diff Detail
- Repository
 - rG LLVM Github Monorepo
 
Event Timeline
| flang/test/Lower/OpenACC/acc-enter-data.f90 | ||
|---|---|---|
| 150–151 | I should have caught this yesterday. But I intended for acc.bounds operation to be dialect agnostic. Since it is normally paired with a pointer to data, lowerbound of zero is the default. I will add a comment to the specification. But basically if array is declared as 1:10, and we want to copy slice 5:10, then the acc.bounds operation is:  | |
| flang/lib/Lower/OpenACC.cpp | ||
|---|---|---|
| 144–145 | You could also use converter.genExprValue directly. For numerical and logical scalars, this is guaranteed to return the loaded value if this was a variable. It looks like your code is a bit different since you only load fir::ReferenceType, but not fir::PointerType/fir::HeapType, is this desired?  | |
| flang/lib/Lower/OpenACC.cpp | ||
|---|---|---|
| 144–145 | I think using converter.genExprValue is fine here. Thanks for pointing me to it.  | |
You could also use converter.genExprValue directly. For numerical and logical scalars, this is guaranteed to return the loaded value if this was a variable. It looks like your code is a bit different since you only load fir::ReferenceType, but not fir::PointerType/fir::HeapType, is this desired?