[DebugInfo][RemoveDIs] Add flag to use "new" debug-info in opt by jmorse · Pull Request #71937 · llvm/llvm-project (original) (raw)

@llvm/pr-subscribers-debuginfo

Author: Jeremy Morse (jmorse)

Changes

Our option to turn on the non-intrinsic form of debug-info (--experimental-debuginfo-iterators) currently requires that LLVM is built with the LLVM_EXPERIMENTAL_DEBUGINFO_ITERATORS cmake flag enabled, so that some (slight) performance regressions aren't on-by-default during the prototype/testing period. However, we still want to be able to optionally run tests, if support is built into LLVM.

To allow optionally exercising the non-intrinsic debug-info code, this patch adds --try-experimental-debuginfo-iterators to opt, which turns the --experimental-debuginfo-iterators flag on if support is built in, or leaves it off. This means we can run tests that:

Which means we can start getting test coverage of DPValues/RemoveDIs behaviour, from in-tree tests, on our RemoveDIs buildbot. All the code to do with automagically converting from one form to the other landed in 10a9e74.


Full diff: https://github.com/llvm/llvm-project/pull/71937.diff

1 Files Affected:

diff --git a/llvm/tools/opt/opt.cpp b/llvm/tools/opt/opt.cpp index bb6627364442ef7..129f754eedda71d 100644 --- a/llvm/tools/opt/opt.cpp +++ b/llvm/tools/opt/opt.cpp @@ -279,6 +279,12 @@ static cl::liststd::string PassPlugins("load-pass-plugin", cl::desc("Load passes from plugin library"));

+static cl::opt TryUseNewDbgInfoFormat("try-experimental-debuginfo-iterators",

+#else

+#endif