History log of /llvm-project/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp (Results 1 – 25 of 90)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4, llvmorg-19.1.3, llvmorg-19.1.2, llvmorg-19.1.1, llvmorg-19.1.0, llvmorg-19.1.0-rc4, llvmorg-19.1.0-rc3, llvmorg-19.1.0-rc2, llvmorg-19.1.0-rc1
# 63e16478 26-Jul-2024 Matt Arsenault <Matthew.Arsenault@amd.com>

CodeGen: Remove MachineModuleInfo reference from MachineFunction (#100357)

This avoids another unserializable field. Move the DbgInfoAvailable
field into the AsmPrinter, which is only really a cache

CodeGen: Remove MachineModuleInfo reference from MachineFunction (#100357)

This avoids another unserializable field. Move the DbgInfoAvailable
field into the AsmPrinter, which is only really a cache/convenience
bit for checking a direct IR module metadata check.

show more ...


# 4ce3993e 26-Jul-2024 Matt Arsenault <Matthew.Arsenault@amd.com>

DebugInfo: Avoid some MMI::hasDebugInfo checks (#100333)

I assume getSubprogram will do the correct thing in hasDebugInfo,
and this is redundant with the debug_compile_units distance check.
This is

DebugInfo: Avoid some MMI::hasDebugInfo checks (#100333)

I assume getSubprogram will do the correct thing in hasDebugInfo,
and this is redundant with the debug_compile_units distance check.
This is in preparation for removing the field.

show more ...


Revision tags: llvmorg-20-init
# 117b53ae 01-Jul-2024 Alexis Engelke <engelke@in.tum.de>

[AsmPrinter] Reduce AsmPrinterHandlers virt. fn calls (#96785)

Currently, an AsmPrinterHandler has several methods that allow to
dynamically hook in unwind or debug info emission, e.g. at begin/end

[AsmPrinter] Reduce AsmPrinterHandlers virt. fn calls (#96785)

Currently, an AsmPrinterHandler has several methods that allow to
dynamically hook in unwind or debug info emission, e.g. at begin/end of
every function or instruction. The class hierarchy and the actually
overridden functions are as follows:

(SymSz=setSymbolSize, mFE=markFunctionEnd, BBS=BasicBlockSection,
FL=Funclet; b=beginX, e=endX)
SymSz Mod Fn mFE BBS FL Inst
AsmPrinterHandler - - - - - - -
` PseudoProbeHandler - - - - - - -
` WinCFGuard - e e - - - -
` EHStreamer - - - - - - -
` DwarfCFIException - e be - be - -
` ARMException - - be e - - -
` AIXException - - e - - - -
` WinException - e be e - be -
` WasmException - e be - - - -
` DebugHandlerBase - b be - be - be
` BTFDebug - e - - - - b
` CodeViewDebug - be - - - - b
` DWARFDebug yes be - - - - b

Doing virtual function calls per instruction is costly and useless when
the called function does nothing.

This commit performs the following clean-up/improvements:

- PseudoProbeHandler is no longer an AsmPrinterHandler -- it used
nothing of its functionality to hook in at the possible points. This
avoids virtual function calls when a pseudo probe printer is present.

- DebugHandlerBase is no longer an AsmPrinterHandler, but a separate
base class. DebugHandlerBase is the only remaining "hook" for begin/end
instruction and setSymbolSize (only used by DWARFDebug). begin/end for
function and basic block sections are never overriden and therefore are
no longer virtual. (Originally I intended there to be only one debug
handler, but BPF as the only target supports two at the same time: DWARF
and BTF.)

- AsmPrinterHandler no longer has begin/end instruction and
setSymbolSize hooks -- these were only used by DebugHandlerBase. This
avoid iterating over handlers in every instruction.

AsmPrinterHandler Mod Fn mFE BBS FL
` WinCFGuard e e - - -
` EHStreamer - - - - -
` DwarfCFIException e be - be -
` ARMException - be e - -
` AIXException - e - - -
` WinException e be e - be
` WasmException e be - - -

SymSz Mod Fn BBS Inst
DebugHandlerBase - b be be be
` BTFDebug - e b
` CodeViewDebug - be b
` DWARFDebug yes be b

PseudoProbeHandler (no shared methods)

To continue allowing external users (e.g., Julia) to hook in at every
instruction, a new method addDebugHandler is exposed.

This results in a performance improvement, especially in the -O0 -g0
case with unwind information (e.g., JIT baseline).

show more ...


# 4169338e 28-Jun-2024 Nikita Popov <npopov@redhat.com>

[IR] Don't include Module.h in Analysis.h (NFC) (#97023)

Replace it with a forward declaration instead. Analysis.h is pulled in
by all passes, but not all passes need to access the module.


Revision tags: llvmorg-18.1.8, llvmorg-18.1.7, llvmorg-18.1.6, llvmorg-18.1.5
# 8d6a9c05 18-Apr-2024 Orlando Cazalet-Hyams <orlando.hyams@sony.com>

[DWARF] Add support for DW_TAG_template_alias for template aliases (#88943)

Part 1 of fix for issue
https://github.com/llvm/llvm-project/issues/54624

Split from PR #87623. Clang front end change

[DWARF] Add support for DW_TAG_template_alias for template aliases (#88943)

Part 1 of fix for issue
https://github.com/llvm/llvm-project/issues/54624

Split from PR #87623. Clang front end changes to follow.

Use DICompositeType to represent the template alias, using its extraData
field as a tuple of DITemplateParameter to describe the template
parameters.

Added template-alias.ll - Check DWARF emission.
Modified frame-types.s - Check llvm-symbolizer understands the DIE.

show more ...


Revision tags: llvmorg-18.1.4, llvmorg-18.1.3, llvmorg-18.1.2, llvmorg-18.1.1, llvmorg-18.1.0, llvmorg-18.1.0-rc4, llvmorg-18.1.0-rc3
# 0b2b91ee 20-Feb-2024 PiJoules <6019989+PiJoules@users.noreply.github.com>

Reapply "[llvm] Fix assertion error where we didn't check fixed point… (#82412)

… types." (#82285)

This reverts commit d9f9775ac6289271d57671c55166fa0cad61075b.

The test was missing a `REQUIRE

Reapply "[llvm] Fix assertion error where we didn't check fixed point… (#82412)

… types." (#82285)

This reverts commit d9f9775ac6289271d57671c55166fa0cad61075b.

The test was missing a `REQUIRES: object-emission`.

show more ...


# d9f9775a 20-Feb-2024 Vladimir Vereschaka <vvereschaka@accesssoftek.com>

Revert "[llvm] Fix assertion error where we didn't check fixed point types." (#82285)

These changes break the `LLVM::fixed-point.ll` test some targets what
fails the builds for those targets
(more

Revert "[llvm] Fix assertion error where we didn't check fixed point types." (#82285)

These changes break the `LLVM::fixed-point.ll` test some targets what
fails the builds for those targets
(more details
https://github.com/llvm/llvm-project/pull/80757#issuecomment-1949382211)

The problem wasn't fixed for few days,

Reverts llvm/llvm-project#80757

show more ...


# 1807e02b 16-Feb-2024 PiJoules <6019989+PiJoules@users.noreply.github.com>

[llvm] Fix assertion error where we didn't check fixed point types. (#80757)

This fixes https://github.com/llvm/llvm-project/issues/81555


Revision tags: llvmorg-18.1.0-rc2, llvmorg-18.1.0-rc1, llvmorg-19-init, llvmorg-17.0.6, llvmorg-17.0.5, llvmorg-17.0.4, llvmorg-17.0.3, llvmorg-17.0.2, llvmorg-17.0.1, llvmorg-17.0.0, llvmorg-17.0.0-rc4, llvmorg-17.0.0-rc3, llvmorg-17.0.0-rc2, llvmorg-17.0.0-rc1, llvmorg-18-init
# 9dcae2f5 12-Jun-2023 OCHyams <orlando.hyams@sony.com>

[DebugInfo] Add DW_ATE_complex_float case to assert in isUnsignedDIType

Without this patch a `DW_ATE_complex_float` encoding trips an assertion in
`DebugHandlerBase::isUnsignedDIType` with the messa

[DebugInfo] Add DW_ATE_complex_float case to assert in isUnsignedDIType

Without this patch a `DW_ATE_complex_float` encoding trips an assertion in
`DebugHandlerBase::isUnsignedDIType` with the message `"Unsupported
encoding"`.

By adding a case to the `assert` for `DW_ATE_complex_float` it becomes
supported, behaving in the same way as the already supported `DW_ATE_float`
type (return false).

Note: For the reported reproducer:

#include <complex.h>
int main() {
long double complex r1;
}

The assertion isn't tripped without assignment tracking because instcombine
deletes everything, including the `dbg.declare`, without recovering any
location information. Whereas with assignment tracking we track a zeroing
memset that is emitted by clang.

Reviewed By: probinson

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

show more ...


Revision tags: llvmorg-16.0.6, llvmorg-16.0.5, llvmorg-16.0.4, llvmorg-16.0.3, llvmorg-16.0.2, llvmorg-16.0.1, llvmorg-16.0.0
# b2020fe3 16-Mar-2023 Felipe de Azevedo Piovezan <fpiovezan@apple.com>

[DbgHistoryCalculator] Improve debug messages

I've found that a frequent source of debug information loss in optimized
code is due to DEBUG_VALUE intrinsics in a position of the instruction
stream t

[DbgHistoryCalculator] Improve debug messages

I've found that a frequent source of debug information loss in optimized
code is due to DEBUG_VALUE intrinsics in a position of the instruction
stream that is outside the scope of the variable it describes.

Tracking these is pretty difficult with the existing debug messages of
the history calculator; this patch addresses the issue by making it
obvious when this event happens.

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

show more ...


Revision tags: llvmorg-16.0.0-rc4, llvmorg-16.0.0-rc3, llvmorg-16.0.0-rc2, llvmorg-16.0.0-rc1, llvmorg-17-init, llvmorg-15.0.7
# 6eb0b0a0 15-Dec-2022 Kazu Hirata <kazu@google.com>

Don't include Optional.h

These files no longer use llvm::Optional.


# 67819a72 13-Dec-2022 Fangrui Song <i@maskray.me>

[CodeGen] llvm::Optional => std::optional


# 6b2829dd 09-Dec-2022 Ariel Burton <Ariel.Burton@ibm.com>

Allow epilogue_begin to be emitted when generating DWARF

We identify epilogue code by looking for instructions tagged
with FrameDestroy.

A function may have more than one epilogue, e.g., because of

Allow epilogue_begin to be emitted when generating DWARF

We identify epilogue code by looking for instructions tagged
with FrameDestroy.

A function may have more than one epilogue, e.g., because of early
returns or code duplicated during optimization. We need only track
the current block, and emit epilogie_begin at most once per block.

We reduce the number of entries in the line table by combining
epilogue_begin with other flags instead of emitting a separate
entry just for epilogue_begin.

Reviewed By: dblaikie, aprantl

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

show more ...


# 998960ee 03-Dec-2022 Kazu Hirata <kazu@google.com>

[CodeGen] Use std::nullopt instead of None (NFC)

This patch mechanically replaces None with std::nullopt where the
compiler would warn if None were deprecated. The intent is to reduce
the amount of

[CodeGen] Use std::nullopt instead of None (NFC)

This patch mechanically replaces None with std::nullopt where the
compiler would warn if None were deprecated. The intent is to reduce
the amount of manual work required in migrating from Optional to
std::optional.

This is part of an effort to migrate from llvm::Optional to
std::optional:

https://discourse.llvm.org/t/deprecating-llvm-optional-x-hasvalue-getvalue-getvalueor/63716

show more ...


Revision tags: llvmorg-15.0.6
# 4af73d7e 22-Nov-2022 James Y Knight <jyknight@google.com>

Refactor AsmPrinterHandler callbacks. NFCI.

The existing behaviors and callbacks were overlapping and had very
confusing semantics: beginBasicBlock/endBasicBlock were not always
called, beginFragmen

Refactor AsmPrinterHandler callbacks. NFCI.

The existing behaviors and callbacks were overlapping and had very
confusing semantics: beginBasicBlock/endBasicBlock were not always
called, beginFragment/endFragment seemed like they were meant to mean
the same thing, but were slightly different, etc. This resulted in
confusing semantics, virtual method overloads, and control flow.

Remove the above, and replace with new beginBasicBlockSection and
endBasicBlockSection callbacks. And document them.

These are always called before the first and after the last blocks in
a function, even when basic-block-sections are disabled.

show more ...


Revision tags: llvmorg-15.0.5, llvmorg-15.0.4, llvmorg-15.0.3, working, llvmorg-15.0.2, llvmorg-15.0.1, llvmorg-15.0.0, llvmorg-15.0.0-rc3, llvmorg-15.0.0-rc2, llvmorg-15.0.0-rc1, llvmorg-16-init
# 9e6d1f4b 17-Jul-2022 Kazu Hirata <kazu@google.com>

[CodeGen] Qualify auto variables in for loops (NFC)


Revision tags: llvmorg-14.0.6, llvmorg-14.0.5, llvmorg-14.0.4, llvmorg-14.0.3, llvmorg-14.0.2, llvmorg-14.0.1, llvmorg-14.0.0, llvmorg-14.0.0-rc4, llvmorg-14.0.0-rc3
# ed98c1b3 09-Mar-2022 serge-sans-paille <sguelton@redhat.com>

Cleanup includes: DebugInfo & CodeGen

Discourse thread: https://discourse.llvm.org/t/include-what-you-use-include-cleanup
Differential Revision: https://reviews.llvm.org/D121332


Revision tags: llvmorg-14.0.0-rc2, llvmorg-14.0.0-rc1, llvmorg-15-init, llvmorg-13.0.1, llvmorg-13.0.1-rc3, llvmorg-13.0.1-rc2
# 34435fd1 05-Jan-2022 Luís Ferreira <contact@lsferreira.net>

[llvm] Add support for DW_TAG_immutable_type

Added documentation about DW_TAG_immutable_type too.

Reviewed By: probinson

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


Revision tags: llvmorg-13.0.1-rc1, llvmorg-13.0.0, llvmorg-13.0.0-rc4
# 5cb21086 20-Sep-2021 David Blaikie <dblaikie@gmail.com>

DebugInfo: Use the signedness of the underlying enum when encoding enum non-type-template-parameters

This improves the accuracy of the debug info and improves round tripping
through -gsimple-templat

DebugInfo: Use the signedness of the underlying enum when encoding enum non-type-template-parameters

This improves the accuracy of the debug info and improves round tripping
through -gsimple-template-names.

show more ...


Revision tags: llvmorg-13.0.0-rc3
# 070090cf 30-Aug-2021 Chih-Ping Chen <chih-ping.chen@intel.com>

[DebugInfo] Remove the restriction on the size of DIStringType
in DebugHandlerBase::isUnsignedDIType.

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


Revision tags: llvmorg-13.0.0-rc2, llvmorg-13.0.0-rc1, llvmorg-14-init, llvmorg-12.0.1, llvmorg-12.0.1-rc4, llvmorg-12.0.1-rc3, llvmorg-12.0.1-rc2
# 516e5bb2 01-Jun-2021 Sriraman Tallam <tmsriram@google.com>

Resubmit D85085 after fixing the tests that were failing.

D85085 was pushed earlier but broke tests on mac and win:
http://lab.llvm.org:8080/green/job/clang-stage1-RA/21182/consoleFull#-706149783d48

Resubmit D85085 after fixing the tests that were failing.

D85085 was pushed earlier but broke tests on mac and win:
http://lab.llvm.org:8080/green/job/clang-stage1-RA/21182/consoleFull#-706149783d489585b-5106-414a-ac11-3ff90657619c

Recommitting it after adding mtriple to the llc commands.

Emit correct location lists with basic block sections.

This patch addresses multiple things:

1) It ensures that const_value is emitted when possible with basic block
sections.
2) It emits location lists such that the labels are always within the
section boundary.
3) It fixes a bug when the parameter is first used in a non-entry block
which is in a different section from the entry block.

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

show more ...


# 192b4141 27-May-2021 Nico Weber <thakis@chromium.org>

Revert "Emit correct location lists with basic block sections."

Breaks check-llvm on non-linux, see comments on https://reviews.llvm.org/D85085
This reverts commit caae570978c490a137921b9516162a3828

Revert "Emit correct location lists with basic block sections."

Breaks check-llvm on non-linux, see comments on https://reviews.llvm.org/D85085
This reverts commit caae570978c490a137921b9516162a382831209e
and follow-up commit 1546c52d971292ed4145b6d41aaca0d02229ebff.

show more ...


# caae5709 27-May-2021 Sriraman Tallam <tmsriram@google.com>

Emit correct location lists with basic block sections.

This patch addresses multiple things:

1) It ensures that const_value is emitted when possible with basic block
sections.
2) It emits location

Emit correct location lists with basic block sections.

This patch addresses multiple things:

1) It ensures that const_value is emitted when possible with basic block
sections.
2) It emits location lists such that the labels are always within the
section boundary.
3) It fixes a bug when the parameter is first used in a non-entry block
which is in a different section from the entry block.

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

show more ...


Revision tags: llvmorg-12.0.1-rc1
# bb346146 12-Apr-2021 Chen Zheng <czhengsz@cn.ibm.com>

[Debug-Info] make fortran CHARACTER(1) type as valid unsigned type

This resolves https://bugs.llvm.org/show_bug.cgi?id=49872

Reviewed By: aprantl

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

[Debug-Info] make fortran CHARACTER(1) type as valid unsigned type

This resolves https://bugs.llvm.org/show_bug.cgi?id=49872

Reviewed By: aprantl

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

show more ...


Revision tags: llvmorg-12.0.0, llvmorg-12.0.0-rc5, llvmorg-12.0.0-rc4
# e64f3ccc 10-Mar-2021 Stephen Tozer <Stephen.Tozer@Sony.com>

Reapply "[DebugInfo] Add DWARF emission for DBG_VALUE_LIST"

This reverts commit 429c6ecbb302e2beedd8694378ae5be456206209.


1234