aboutsummaryrefslogtreecommitdiff
path: root/llvm/unittests/Object/ELFObjectFileTest.cpp
diff options
context:
space:
mode:
authorRazvan Lupusoru <razvan.lupusoru@gmail.com>2025-10-30 16:17:00 -0700
committerGitHub <noreply@github.com>2025-10-30 16:17:00 -0700
commit9077522b2b2bf1a1ce2fca60ae76536ed1bbeb26 (patch)
tree4e08e8b7157b17a2f6544a885d3396dc3375e6b5 /llvm/unittests/Object/ELFObjectFileTest.cpp
parentf7a21a837c57ef182bee364923e92308d36c2d0d (diff)
downloadllvm-9077522b2b2bf1a1ce2fca60ae76536ed1bbeb26.zip
llvm-9077522b2b2bf1a1ce2fca60ae76536ed1bbeb26.tar.gz
llvm-9077522b2b2bf1a1ce2fca60ae76536ed1bbeb26.tar.bz2
[acc][flang] Define hasUnknownDimensions in MappableType (#165794)
The MappableType interface currently defines a `generateAccBounds` method which examines a variable and generates `acc.bounds` operations that encode its dimensions. The implementation can extract bounds information in various ways: either from the MLIR type itself or by analyzing the IR to find dimension information from defining operations. However, we need to distinguish between cases where dimensional information is not directly available from the type itself. This new `hasUnknownDimensions` API returns true when the MLIR type does not encode dimensional information and there is no associated descriptor or metadata that would make this information extractable from the visible ssa value the represents the variable. The expected use case is calling `generateAccBounds` only when this returns true, as it indicates that bounds must be extracted from the IR (by walking back from current variable to its defining spots or its descriptor). This supports cases such as raw references to arrays with non-constant bounds (e.g., explicit-shape arrays in Fortran where bounds are passed as arguments). This functionality could also be leveraged for CIR VLA support in the future. For FIR types: - Box types return false (descriptor encodes dimensions) - Reference types check if the pointee has dynamic size using fir::hasDynamicSize()
Diffstat (limited to 'llvm/unittests/Object/ELFObjectFileTest.cpp')
0 files changed, 0 insertions, 0 deletions