[PATCH] D80197: [DebugInfo] Upgrade DISubrange to support Fortran dynamic arrays
Alok Kumar Sharma via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 19 02:08:27 PDT 2020
alok created this revision.
alok added projects: debug-info, LLVM.
Herald added subscribers: llvm-commits, ormris, hiraditya.
Herald added a reviewer: sscalpone.
Summary:
This patch upgrades DISubrange to support fortran requirements.
Below are the updates/addition of fields.
lowerBound - Now accepts signed integer or DIVariable or DIExpression, earlier it accepted only signed integer.
upperBound - This field is now added and accepts signed interger or DIVariable or DIExpression.
stride - This field is now added and accepts signed interger or DIVariable or DIExpression.
Earlier, count was REQUIERED field, now either of count or upperBound
must be present.
Earlier, absence of lowerBound was considered as lowerBound=0 (considering only c),
considering Fortran which has default lowerBound=1, we'll not stick to that
assumption, Now distinct node will be created for absent lowerBound.
This is required to describe bounds of array which are known at runtime.
Testing:
- added unit tests (hand written)
- check llvm
- check debug-info
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D80197
Files:
llvm/include/llvm/IR/DIBuilder.h
llvm/include/llvm/IR/DebugInfoMetadata.h
llvm/lib/AsmParser/LLParser.cpp
llvm/lib/Bitcode/Reader/MetadataLoader.cpp
llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
llvm/lib/IR/AsmWriter.cpp
llvm/lib/IR/DIBuilder.cpp
llvm/lib/IR/DebugInfoMetadata.cpp
llvm/lib/IR/LLVMContextImpl.h
llvm/lib/IR/Verifier.cpp
llvm/test/Assembler/debug-info.ll
llvm/test/Assembler/disubrange-empty-array.ll
llvm/test/Assembler/invalid-disubrange-count-missing.ll
llvm/test/Bindings/llvm-c/debug_info.ll
llvm/test/Bitcode/fortranSubrange.ll
llvm/test/Bitcode/fortranSubrangeBackward.ll
llvm/test/Bitcode/fortranSubrangeBackward.ll.bc
llvm/test/DebugInfo/X86/default-subrange-array.ll
llvm/test/DebugInfo/X86/nondefault-subrange-array.ll
llvm/test/DebugInfo/fortranSubrangeExpr.ll
llvm/test/DebugInfo/fortranSubrangeInt.ll
llvm/test/DebugInfo/fortranSubrangeVar.ll
llvm/test/Verifier/disubrange-missing-upperBound.ll
llvm/test/Verifier/invalid-disubrange-lowerBound.ll
llvm/test/Verifier/invalid-disubrange-stride.ll
llvm/test/Verifier/invalid-disubrange-upperBound.ll
llvm/unittests/IR/MetadataTest.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80197.264823.patch
Type: text/x-patch
Size: 49067 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200519/c8c9b246/attachment.bin>
More information about the llvm-commits
mailing list