HomePhabricator

[clang] Add option to clear AST memory before running LLVM passes

Authored by aeubanks on Sep 14 2021, 1:09 PM.

Description

[clang] Add option to clear AST memory before running LLVM passes

This is to save memory for Clang compiles.
Measuring building PassBuilder.cpp under /usr/bin/time, max rss goes from 0.93GB to 0.7GB.

This does not turn it by default yet.

I've turned on the option locally and run it over a good amount of files without any issues.

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

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D111105

Details

Committed
aeubanksOct 6 2021, 1:42 PM
Reviewer
dblaikie
Differential Revision
D111105: [clang] Add option to clear AST memory before running LLVM passes
Parents
rG05392466f02b: Reland [IR] Increase max alignment to 4GB
Branches
Unknown
Tags
Unknown