[PATCH] D75338: [Coroutines] Use dbg.declare for frame variables

David Stenberg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 28 04:59:58 PST 2020


dstenb added inline comments.


================
Comment at: llvm/test/Transforms/Coroutines/coro-debug-frame-variable.ll:877
+!653 = !DILocalVariable(name: "j", scope: !649, file: !5, line: 32, type: !130)
+!654 = !DILocation(line: 32, column: 7, scope: !649)
----------------
modocache wrote:
> Beginner question of mine: is there a good way to reduce this debugging metadata to just the nodes that are necessary for my test? The 654 (!!) nodes here are the result of having run `llvm-reduce` on this test case, but I think many of these remaining nodes come from my having `#include <experimental/coroutine>` in my test program, and not actually necessary for the test case.
Bugpoint can reduce metadata, but I have personally found that it is not the best at that. It might just be a PEBKAC problem though. I personally just try to minimize the number of metadata nodes that Clang emits by first creducing the source file,  omitting information that is not needed (e.g. passing -gno-column-info and -fno-strict-aliasing depending on situation), and then hand reducing the IR file.

In this case it seems that we can remove all the import node references in !108 (I assume they are not needed for this test case), and then run opt -S on the file, to remove all unused nodes. That leaves around 120 metadata nodes. I don't know much about C++ metadata (especially coroutines), so not sure how much more can be removed, but perhaps that is a start?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D75338





More information about the llvm-commits mailing list