[PATCH] D62264: [CommandLine] WIP: Add new debug_opt that reduces down to size of DataType in Release builds.

Chris Bieneman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 22 15:09:50 PDT 2019


beanz added a comment.

A very interesting idea. A few thoughts inline.



================
Comment at: llvm/include/llvm/Support/CommandLine.h:2019
 
+#ifndef NDEBUG
+template <class DataType, bool ExternalStorage = false,
----------------
I suspect that `NDEBUG` probably isn't the right gating for this. We actually probably want this to be something controlled by a build system option.


================
Comment at: llvm/unittests/Support/CommandLineTest.cpp:99
+#else
+  // debug_opt's aren't available as commandline options in release builds.
+  EXPECT_FALSE(
----------------
I'm a little concerned about how this would work. For one thing it makes testing and reproducing bugs in release builds trickier. I suspect with your patch as-is if you converted many of the target options to `debug_opt` `check-llvm` would fail gloriously. I'm not sure that is the behavior we want because I know many distribution workflows rely on running the tests against the build before packaging the distribution.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D62264





More information about the llvm-commits mailing list