[PATCH] D132077: [llvm-reduce] Add pass that reduces DebugInfo metadata
Matthew Voss via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 5 15:44:53 PDT 2022
ormris marked 4 inline comments as done.
ormris added inline comments.
================
Comment at: llvm/tools/llvm-reduce/deltas/ReduceDIMetadata.cpp:36
+ for (const auto &NMD : MDs)
+ if (NMD && !Visited.count(NMD))
+ ToLook.push_back(NMD);
----------------
aeubanks wrote:
> when would this be false/null?
NMD could be null if debug metadata attachment was null. I believe it's legal to say `!dbg !null`, but I could be misremembering. The second condition could be false if multiple nodes had the same debug metadata attachment.
================
Comment at: llvm/tools/llvm-reduce/deltas/ReduceDIMetadata.cpp:45
+ if (DINode *DIM = dyn_cast_or_null<DINode>(MD)) {
+ // Scan operands and record attached tuples
+ for (size_t I = 0; I < DIM->getNumOperands(); ++I)
----------------
aeubanks wrote:
> some indentation weirdness, `git clang-format`?
This is what clang-format outputs. Happy to make it look cleaner, but I couldn't see a way to improve it.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D132077/new/
https://reviews.llvm.org/D132077
More information about the llvm-commits
mailing list