[PATCH] D99335: [DebugInfo] Upgrade DISubragne::count to accept DIExpression also
Alok Kumar Sharma via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 25 06:25:28 PDT 2021
alok created this revision.
alok added reviewers: djtodoro, aprantl, jmorse, jini.susan.george, SouraVX, bhuvanendrakumarn.
alok added a project: debug-info.
Herald added subscribers: dexonsmith, ormris, hiraditya.
Herald added a reviewer: sscalpone.
alok requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
This is needed for Fortran assumed shape arrays whose dimensions are defined as,
- 'count' is taken from array descriptor passed as parameter by caller, access from descriptor is defined by type DIExpression.
- 'lowerBound' is defined by callee.
The current alternate way represents using upperBound in place of count, where
- where upperBound is calculated in callee in a temp variable using lowerBound and count
Representation with count (DIExpression) is not only clearer as compared to upperBound (DIVariable) but it has another
advantage that variable count is accessed by being parameter has better chance of survival at higher optimization level than upperBound being local variable.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D99335
Files:
llvm/include/llvm/IR/DebugInfoMetadata.h
llvm/lib/AsmParser/LLParser.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
llvm/lib/IR/AsmWriter.cpp
llvm/lib/IR/DebugInfoMetadata.cpp
llvm/lib/IR/Verifier.cpp
llvm/test/DebugInfo/fortranSubrangeCountExpr.ll
llvm/test/Verifier/invalid-disubrange-count-node.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99335.333273.patch
Type: text/x-patch
Size: 9390 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210325/09c0da87/attachment.bin>
More information about the llvm-commits
mailing list