[PATCH] D132077: [llvm-reduce] Add pass that reduces DebugInfo metadata

Arthur Eubanks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 6 14:22:33 PDT 2022


aeubanks added inline comments.


================
Comment at: llvm/tools/llvm-reduce/deltas/ReduceDIMetadata.cpp:83
+  MDNodeList MDs;
+  // Collect all !dbg metadata attachments.
+  for (const auto &DC : Program.debug_compile_units())
----------------
ellis wrote:
> In D135237 I searched through `Program.named_metadata()` which includes things like `!llvm.module.flags` and `!llvm.dbg.cu` (I assume this is the same as `Program.debug_compile_units()`). Do we also want to reduce these? My guess is this patch won't remove unnecessary module flags. Is that the case?
At least in regards to `!llvm.dbg.cu`, I've seen `DICompileUnit not listed in llvm.dbg.cu` verifier errors, so we need to take care there. `!llvm.module.flags` should be reducable (and I do that manually a lot, so it'd be nice to get that working)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D132077/new/

https://reviews.llvm.org/D132077



More information about the llvm-commits mailing list