[PATCH] D18808: Use the NoDebug emission kind to identify compile units that no debug info should be created from.

Adrian Prantl via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 5 16:55:16 PDT 2016


aprantl created this revision.
aprantl added reviewers: dblaikie, echristo, dexonsmith.
aprantl added subscribers: davide, llvm-commits, cfe-commits.
aprantl set the repository for this revision to rL LLVM.

As indicated in D18612, sample-based profiling and optimization remarks currently remove DICompileUnits from llvm.dbg.cu to suppress the emission of debug info from them. This is somewhat of a hack and only borderline legal IR.

This patch uses the recently introduced NoDebug emission kind in DICompileUnit to achieve the same result without breaking the Verifier. A nice side-effect of this change is that it is now possible to combine NoDebug and regular compile units under LTO.

For simplicity I combined the llvm and cfe patches into one review.

Repository:
  rL LLVM

http://reviews.llvm.org/D18808

Files:
  include/llvm/IR/DIBuilder.h
  lib/CodeGen/AsmPrinter/DwarfDebug.cpp
  lib/IR/DIBuilder.cpp
  test/DebugInfo/X86/mixed-nodebug-cu.ll
  tools/clang/lib/CodeGen/CGDebugInfo.cpp
  tools/clang/test/Frontend/optimization-remark.c
  tools/clang/test/Frontend/profile-sample-use-loc-tracking.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18808.52745.patch
Type: text/x-patch
Size: 10528 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160405/2378bca0/attachment.bin>


More information about the cfe-commits mailing list