[all-commits] [llvm/llvm-project] 1ebc30: [DebugInfo][RemoveDIs] Remove debug-intrinsic prin...

Jeremy Morse via All-commits all-commits at lists.llvm.org
Tue Apr 1 06:28:24 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1ebc308bba0e1403b9fb3ba0fbadc66e182138e0
      https://github.com/llvm/llvm-project/commit/1ebc308bba0e1403b9fb3ba0fbadc66e182138e0
  Author: Jeremy Morse <jeremy.morse at sony.com>
  Date:   2025-04-01 (Tue, 01 Apr 2025)

  Changed paths:
    M flang/test/Integration/debug-local-var-2.f90
    M llvm/docs/LangRef.rst
    M llvm/lib/AsmParser/LLParser.cpp
    M llvm/lib/Bitcode/Reader/BitcodeReader.cpp
    M llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
    M llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp
    M llvm/lib/CodeGen/MIRPrinter.cpp
    M llvm/lib/IR/BasicBlock.cpp
    M llvm/lib/IR/IRPrintingPasses.cpp
    M llvm/lib/IRPrinter/IRPrintingPasses.cpp
    M llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp
    M llvm/test/Analysis/CostModel/X86/free-intrinsics.ll
    M llvm/test/Analysis/CostModel/free-intrinsics-datalayout.ll
    M llvm/test/Analysis/CostModel/free-intrinsics-no_info.ll
    M llvm/test/Bitcode/DIExpression-aggresult.ll
    A llvm/test/Bitcode/dbg-intrinsics-autoupgrade.ll
    A llvm/test/Bitcode/dbg-intrinsics-autoupgrade.ll.bc
    M llvm/test/Bitcode/dbg-label-record-bc.ll
    M llvm/test/Bitcode/dbg-record-roundtrip.ll
    M llvm/test/Bitcode/upgrade-dbg-addr.ll
    M llvm/test/CodeGen/Generic/MIRDebugify/locations-and-values.mir
    M llvm/test/DebugInfo/X86/undef-dbg-val.ll
    R llvm/test/DebugInfo/print-non-instruction-debug-info.ll
    R llvm/test/DebugInfo/roundtrip-non-instruction-debug-info.ll
    M llvm/test/DebugInfo/salvage-cast-debug-info.ll
    M llvm/test/Transforms/GlobalOpt/localize-constexpr-debuginfo.ll
    M llvm/test/Transforms/Scalarizer/dbginfo.ll
    R llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values.ll
    R llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values.ll.expected
    R llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values.ll.funcsig.expected
    R llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values.ll.funcsig.globals.expected
    R llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values.ll.funcsig.noglobals.expected
    R llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values.ll.funcsig.transitiveglobals.expected
    M llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values_dbgrecords.ll
    M llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values_dbgrecords.ll.expected
    M llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values_dbgrecords.ll.funcsig.expected
    M llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values_dbgrecords.ll.funcsig.globals.expected
    M llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values_dbgrecords.ll.funcsig.noglobals.expected
    M llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/various_ir_values_dbgrecords.ll.funcsig.transitiveglobals.expected
    R llvm/test/tools/UpdateTestChecks/update_test_checks/various_ir_values.test
    M llvm/test/tools/llvm-reduce/remove-dp-values.ll
    M llvm/tools/llvm-as/llvm-as.cpp
    M llvm/tools/llvm-dis/llvm-dis.cpp
    M llvm/tools/llvm-link/llvm-link.cpp
    M llvm/tools/llvm-lto/llvm-lto.cpp
    M llvm/tools/llvm-lto2/llvm-lto2.cpp
    M llvm/unittests/Analysis/IRSimilarityIdentifierTest.cpp
    M llvm/unittests/Transforms/Utils/LocalTest.cpp
    M mlir/lib/Target/LLVMIR/ConvertToLLVMIR.cpp
    M mlir/test/Target/LLVMIR/llvmir-debug.mlir
    M mlir/test/lib/Dialect/Test/TestToLLVMIRTranslation.cpp

  Log Message:
  -----------
  [DebugInfo][RemoveDIs] Remove debug-intrinsic printing cmdline options (#131855)

During the transition from debug intrinsics to debug records, we used
several different command line options to customise handling: the
printing of debug records to bitcode and textual could be independent of
how the debug-info was represented inside a module, whether the
autoupgrader ran could be customised. This was all valuable during
development, but now that totally removing debug intrinsics is coming
up, this patch removes those options in favour of a single flag
(experimental-debuginfo-iterators), which enables autoupgrade, in-memory
debug records, and debug record printing to bitcode and textual IR.

We need to do this ahead of removing the
experimental-debuginfo-iterators flag, to reduce the amount of
test-juggling that happens at that time.

There are quite a number of weird test behaviours related to this --
some of which I simply delete in this commit. Things like
print-non-instruction-debug-info.ll , the test suite now checks for
debug records in all tests, and we don't want to check we can print as
intrinsics. Or the update_test_checks tests -- these are duplicated with
write-experimental-debuginfo=false to ensure file writing for intrinsics
is correct, but that's something we're imminently going to delete.

A short survey of curious test changes:
* free-intrinsics.ll: we don't need to test that debug-info is a zero
cost intrinsic, because we won't be using intrinsics in the future.
* undef-dbg-val.ll: apparently we pinned this to non-RemoveDIs in-memory
mode while we sorted something out; it works now either way.
* salvage-cast-debug-info.ll: was testing intrinsics-in-memory get
salvaged, isn't necessary now
* localize-constexpr-debuginfo.ll: was producing "dead metadata"
intrinsics for optimised-out variable values, dbg-records takes the
(correct) representation of poison/undef as an operand. Looks like we
didn't update this in the past to avoid spurious test differences.
* Transforms/Scalarizer/dbginfo.ll: this test was explicitly testing
that debug-info affected codegen, and we deferred updating the tests
until now. This is just one of those silent gnochange issues that get
fixed by RemoveDIs.

Finally: I've added a bitcode test, dbg-intrinsics-autoupgrade.ll.bc,
that checks we can autoupgrade debug intrinsics that are in bitcode into
the new debug records.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list