[PATCH] D65026: [Bugpoint redesign] Added pass to reduce Metadata

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 14 15:31:27 PDT 2019


dblaikie added inline comments.


================
Comment at: llvm/test/Reduce/remove-metadata.ll:8-24
+; CHECK-NOT: !llvm.dbg.cu
+!llvm.dbg.cu = !{!0}
+; CHECK: !llvm.module.flags
+!llvm.module.flags = !{!3, !4, !5}
+; CHECK-NOT: !llvm.ident
+!llvm.ident = !{!6}
+
----------------
Could you change all of this metadata (both named and unnamed) to be more "arbitrary" rather than special llvm things - use some metasyntactic variable names (foo/bar/baz, etc) and only include as much as is needed to test the code? (so I guess only two named (one that's kept, one that's dropped) and two unnamed nodes)?

Probably actively test /for/ the presence of the things that remain (and a CHECK-NOT: ! after it, just to be "and no other nodes after this" rather than having to explain why 3 is the right number)


================
Comment at: llvm/tools/llvm-reduce/deltas/ReduceMetadata.cpp:60
+  for (auto &F : *Program) {
+    getChunkMetadataNodes(&F, I, ChunksToKeep, SeenNodes, NodesToKeep);
+    for (auto &BB : F)
----------------
This is for removing metadata from functions, right? But there's no testing for metadata on functions anymore - does that testing need to be added?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D65026





More information about the llvm-commits mailing list