[PATCH] D101793: [clang][AST] Improve AST Reader/Writer memory footprint

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 20 19:02:24 PDT 2021


yaxunl added a comment.

In D101793#2772461 <https://reviews.llvm.org/D101793#2772461>, @weiwang wrote:

> Thanks for the approval!
>
> Just want to understand the list of "decls to check for deferred diagnostics" better, where are these decls coming from? And why do they need to be checked for warnings? I see decls from libc are in the list, but I have no idea why are they selected.

For offloading languages e.g. OpenMP/CUDA/HIP, there are apparent errors in functions shared between host and device. However, unless these functions are sure to be emitted on device or host, these errors should not be emitted. These errors are so called deferred error messages. The function decls which need to be checked are recorded. After AST is finalized, the AST of these functions are iterated. If a function is found sure to be emitted, the deferred error message in it are emitted.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D101793



More information about the cfe-commits mailing list