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

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 22 16:45:42 PDT 2019


dblaikie added a comment.

The goal of this pass is to be able to remove as many intrinsic calls and metadata (debug info and non-debug info metadata alike) while still preserving the "interestingness". I would figure maybe some more testing would be appropriate - since this currently only tests (if I understand the test) that it can remove all of these things - not that it preserves any of them at any time? Perhaps some tests for certain interesting metadata and intrinsics to ensure some are preserved?

(also, if the goal is to make a more streamlined reduction tool - maybe it'd be good to avoid adding a new command line argument/tweakable knob? & have more targeted tests/interestingness test? (to make tests more legible, I wonder if it'd be handy to keep the interestingness test inside the test - in the form of catting it out to a file from the .ll test file?))



================
Comment at: llvm/tools/llvm-reduce/llvm-reduce.cpp:56-76
+namespace {
+std::vector<std::string> DeltaPasses;
+
+struct DeltaPassOption {
+  void operator=(const std::string &Val) const {
+    if (Val.empty())
+      return;
----------------
Is this idiomatic? (are there other uses of cl options that use a similar structure (indirecting through cl::location, then storing to another variable?) - I just haven't seen it done that way & wonder if there's some other cl::opt usage that would be more suitable/common)


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