[PATCH] D147270: [DebugInfo] Support more than 2 operands in DWARF operations
Scott Linder via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 30 13:52:38 PDT 2023
scott.linder created this revision.
Herald added a subscriber: hiraditya.
Herald added a project: All.
scott.linder requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
Update DWARFExpression::Operation and LVOperation to support more than
2 operands.
For DWARFExpression::Operation we still define the upper bound statically,
as we want to declare the Descriptions in a constexpr array.
For LVOperation (which doesn't have the same constexpr requirement) we
take the opportunity to just use a SmallVector, which will handle at
least 2 operands without allocation anyway.
There are still places where the limit remains 2, namely in the
DWARFLinker and in DIExpressions, but these can come in later patches as
needed.
There are no explicit tests as this is nearly NFC: no new operation is
added which makes use of the additional operand capacity yet. A future
patch adding a new DWARF extension point will include operations which
require the support.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D147270
Files:
llvm/include/llvm/DebugInfo/DWARF/DWARFExpression.h
llvm/include/llvm/DebugInfo/LogicalView/Core/LVLocation.h
llvm/include/llvm/DebugInfo/LogicalView/Core/LVReader.h
llvm/include/llvm/DebugInfo/LogicalView/Core/LVSymbol.h
llvm/include/llvm/DebugInfo/LogicalView/Readers/LVCodeViewReader.h
llvm/include/llvm/DebugInfo/LogicalView/Readers/LVELFReader.h
llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
llvm/lib/DWARFLinker/DWARFLinker.cpp
llvm/lib/DebugInfo/DWARF/DWARFExpression.cpp
llvm/lib/DebugInfo/LogicalView/Core/LVLocation.cpp
llvm/lib/DebugInfo/LogicalView/Core/LVSymbol.cpp
llvm/lib/DebugInfo/LogicalView/Readers/LVCodeViewReader.cpp
llvm/lib/DebugInfo/LogicalView/Readers/LVCodeViewVisitor.cpp
llvm/lib/DebugInfo/LogicalView/Readers/LVELFReader.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147270.509805.patch
Type: text/x-patch
Size: 19688 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230330/6d901cd0/attachment.bin>
More information about the llvm-commits
mailing list