[PATCH] D78884: [CMake] -gen-dag-isel: add -omit-comments if neither Debug nor RelWithDebInfo

Nemanja Ivanovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 8 17:12:38 PDT 2020


nemanjai added a comment.

In D78884#2081132 <https://reviews.llvm.org/D78884#2081132>, @MaskRay wrote:

> How are comments helpful if no debugging information is produced (neither RelWithDebInfo nor Debug)? You don't have line tables and the debugger cannot associate the source lines. If you have reasons that `-UNDEBUG` builds may need comments, we can check LLVM_ENABLE_ASSERTIONS in CMake as well.


The dump from `-debug-only=isel` lists everything the instruction selector tried in order which makes it very easy to reason about what it did. But the indices into the `MatcherTable` are the comments that this patch removes. The reason I suggested using `NDEBUG` is that the debug messages from the SDAG that refer to these are also guarded by that macro (since they are `LLVM_DEBUG` messages).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D78884





More information about the llvm-commits mailing list