[PATCH] D154372: [DebugInfo][RemoveDIs] Plumb remove-DIs command line switch into pass managers for ease of testing
Jeremy Morse via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 3 10:25:30 PDT 2023
jmorse created this revision.
jmorse added reviewers: Orlando, StephenTozer, probinson.
Herald added a subscriber: hiraditya.
Herald added a project: All.
jmorse requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
This patch plumbs the command line `--experimental-debuginfo-iterators` flag in to the pass managers, so that modules can be converted to the new format, passes run, then converted back to the old format. That allows developers to test-out the new debuginfo representation across some part of LLVM with no further work, and from the command line. We've also installed flag-catchers at the various points that bitcode and textual IR can egress from a process, and temporarily convert the module to dbg.value format when doing so. This allows, for example, the test suite to be run with the command line option, and the reasonable possibility that it could work! (More work required to get there though). These blocks of code should be considered transitory as we (hopefully) move from one debug-info format to another.
This patch also provides the `BasicBlock::dumpDbgValues` method to give a rough illustration of what the DPMarker / DPValue layout looks like in a block. This isn't intended to be a formal, textual representation of that information, only a debugging aid -- I'm still diligently keeping away from producing a textual IR.
There are no tests: it's not clear to me how to test this behaviour. The objective is to let you silently turn on a different, but transparent, representation in memory to see whether it works or not. Thus, there /shouldn't/ be an observable change in behaviour to test for. Possibly this means that unit tests are the answer, although I'm open to suggestions.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D154372
Files:
llvm/include/llvm/IR/PassManager.h
llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp
llvm/lib/CodeGen/MIRPrinter.cpp
llvm/lib/IR/AsmWriter.cpp
llvm/lib/IR/BasicBlock.cpp
llvm/lib/IR/IRPrintingPasses.cpp
llvm/lib/IR/LegacyPassManager.cpp
llvm/lib/IRPrinter/IRPrintingPasses.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D154372.536820.patch
Type: text/x-patch
Size: 15210 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230703/4ebdbbd9/attachment.bin>
More information about the llvm-commits
mailing list