[cfe-dev] [RFC] Clearing Clang AST before running backend optimizations/codegen to save memory
Arthur Eubanks via cfe-dev
cfe-dev at lists.llvm.org
Tue Sep 21 16:11:12 PDT 2021
>
> I haven't looked too much into the -disable-free stuff, but the reason it
>> mitigates crashes is because if we clear AST objects we still have dangling
>> references to them that we later attempt to clean up unless we
>> -disable-free.
>>
>
> So disabling free is keeping more things alive - perhaps then the RAM
> savings aren't as much as they could be if freeing was enabled? But yeah,
> more to look into.
>
-disable-free only disables freeing things right before we exit to save
some runtime during teardown (since the kernel freeing things is probably
faster than the userspace allocator freeing things), so it shouldn't affect
the amount of memory savings we get.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20210921/2ee066e6/attachment.html>
More information about the cfe-dev
mailing list