llvm-project/clang
Arthur Eubanks 19b07ec000 Reland [clang] Pass -clear-ast-before-backend in Clang::ConstructJob()
This clears the memory used for the Clang AST before we run LLVM passes.

https://llvm-compile-time-tracker.com/compare.php?from=d0a5f61c4f6fccec87fd5207e3fcd9502dd59854&to=b7437fee79e04464dd968e1a29185495f3590481&stat=max-rss
shows significant memory savings with no slowdown (in fact -O0 slightly speeds up).

For more background, see
https://lists.llvm.org/pipermail/cfe-dev/2021-September/068930.html.

Turn this off for the interpreter since it does codegen multiple times.

Relanding with fix for -print-stats: D111973

Relanding with fix for plugins: D112190

If you'd like to use this even with plugins, consider using the features
introduced in D112096.

This can be turned off with -Xclang -no-clear-ast-before-backend.

Differential Revision: https://reviews.llvm.org/D111270
2021-10-21 09:25:53 -07:00
..
INPUTS
bindings [Clang] Add __ibm128 type to represent ppc_fp128 2021-09-06 18:00:58 +08:00
cmake Reapply [ORC-RT] Configure the ORC runtime for more architectures and platforms 2021-10-21 09:00:18 -07:00
docs [docs] Fix hyperlink 2021-10-20 10:20:17 +01:00
examples [clang] Add plugin ActionType to run command line plugin before main action 2021-10-20 08:58:20 -07:00
include [Clang] Support typedef with btf_decl_tag attributes 2021-10-21 08:41:49 -07:00
lib Reland [clang] Pass -clear-ast-before-backend in Clang::ConstructJob() 2021-10-21 09:25:53 -07:00
runtime Prepare Compiler-RT for GnuInstallDirs, matching libcxx, document all 2021-07-13 15:21:41 +00:00
test [clang] Don't clear AST if we have consumers running after the main action 2021-10-21 09:03:57 -07:00
tools [clang][deps] Make resource directory deduction configurable 2021-10-21 14:06:52 +02:00
unittests [clang-format] [PR52015] clang-format should put __attribute__((foo)) on its own line before @interface / @implementation / @protocol 2021-10-20 09:09:31 +01:00
utils [clang] Use StringRef::contains (NFC) 2021-10-21 08:58:19 -07:00
www Update the title and encoding for the C++ status page 2021-10-21 12:14:44 -04:00
.clang-format
.clang-tidy .clang-tidy: Disable misc-no-recursion in general/across the monorepo 2021-06-08 08:31:33 -07:00
.gitignore
CMakeLists.txt [CMake] Fix typo in error message for LLD in bootstrap builds. 2021-10-06 22:38:12 +05:30
CODE_OWNERS.TXT Add myself as a code owner for SYCL support 2021-09-20 09:32:25 +03:00
INSTALL.txt
LICENSE.TXT
ModuleInfo.txt
NOTES.txt
README.txt

README.txt

//===----------------------------------------------------------------------===//
// C Language Family Front-end
//===----------------------------------------------------------------------===//

Welcome to Clang.  This is a compiler front-end for the C family of languages
(C, C++, Objective-C, and Objective-C++) which is built as part of the LLVM
compiler infrastructure project.

Unlike many other compiler frontends, Clang is useful for a number of things
beyond just compiling code: we intend for Clang to be host to a number of
different source-level tools.  One example of this is the Clang Static Analyzer.

If you're interested in more (including how to build Clang) it is best to read
the relevant web sites.  Here are some pointers:

Information on Clang:             http://clang.llvm.org/
Building and using Clang:         http://clang.llvm.org/get_started.html
Clang Static Analyzer:            http://clang-analyzer.llvm.org/
Information on the LLVM project:  http://llvm.org/

If you have questions or comments about Clang, a great place to discuss them is
on the Clang development mailing list:
  http://lists.llvm.org/mailman/listinfo/cfe-dev

If you find a bug in Clang, please file it in the LLVM bug tracker:
  http://llvm.org/bugs/