[all-commits] [llvm/llvm-project] 2e6bb8: [DebugInfo] Support more than 2 operands in DWARF ...

Scott Linder via All-commits all-commits at lists.llvm.org
Mon Jun 19 12:39:31 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2e6bb8c9b82c185f0e96895b1f69045cfb0640b4
      https://github.com/llvm/llvm-project/commit/2e6bb8c9b82c185f0e96895b1f69045cfb0640b4
  Author: Scott Linder <Scott.Linder at amd.com>
  Date:   2023-06-19 (Mon, 19 Jun 2023)

  Changed paths:
    M llvm/include/llvm/DebugInfo/DWARF/DWARFExpression.h
    M llvm/include/llvm/DebugInfo/LogicalView/Core/LVLocation.h
    M llvm/include/llvm/DebugInfo/LogicalView/Core/LVReader.h
    M llvm/include/llvm/DebugInfo/LogicalView/Core/LVSymbol.h
    M llvm/include/llvm/DebugInfo/LogicalView/Readers/LVCodeViewReader.h
    M llvm/include/llvm/DebugInfo/LogicalView/Readers/LVELFReader.h
    M llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
    M llvm/lib/DWARFLinker/DWARFLinker.cpp
    M llvm/lib/DebugInfo/DWARF/DWARFExpression.cpp
    M llvm/lib/DebugInfo/LogicalView/Core/LVLocation.cpp
    M llvm/lib/DebugInfo/LogicalView/Core/LVSymbol.cpp
    M llvm/lib/DebugInfo/LogicalView/Readers/LVCodeViewReader.cpp
    M llvm/lib/DebugInfo/LogicalView/Readers/LVCodeViewVisitor.cpp
    M llvm/lib/DebugInfo/LogicalView/Readers/LVELFReader.cpp

  Log Message:
  -----------
  [DebugInfo] Support more than 2 operands in DWARF operations

Update DWARFExpression::Operation and LVOperation to support more than
2 operands.

Take the opportunity to use a SmallVector, which will handle at least 2
operands without allocation anyway, and removes the static limit
completely.

As there is no longer the concept of an "unused operand", remove
Operation::Encoding::SizeNA. Any use of it is now replaced with explicit
checks for how many operands an operation has.

There are still places where the limit remains 2, namely in the
DWARFLinker and in DIExpressions, but these can be updated 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.

Reviewed By: Orlando, CarlosAlbertoEnciso

Differential Revision: https://reviews.llvm.org/D147270




More information about the All-commits mailing list